{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 简介\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>YiJingFramework.Annotating.Zhouyi, 7.0.1</span></li></ul></div></div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#r \"nuget:YiJingFramework.Annotating.Zhouyi\"\n",
    "\n",
    "using System.Diagnostics;\n",
    "using System.Net.Http;\n",
    "using YiJingFramework.Annotating;\n",
    "using YiJingFramework.Annotating.Zhouyi;\n",
    "using YiJingFramework.Annotating.Zhouyi.Entities;\n",
    "using YiJingFramework.PrimitiveTypes.GuaWithFixedCount;"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "此包提供了一套针对《周易》与《易传》的注解仓库读写方案。举例而言：\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "见群龙无首吉\r\n"
     ]
    }
   ],
   "source": [
    "var storeUri = \"https://yueyinqiu.github.io/my-yijing-annotation-stores/975345ca/2023-08-02-1.json\";\n",
    "var httpClient = new HttpClient();\n",
    "var storeString = await httpClient.GetStringAsync(storeUri);\n",
    "var store = ZhouyiStore.DeserializeFromJsonString(storeString);\n",
    "Debug.Assert(store is not null);\n",
    "\n",
    "var qian = store.GetHexagram(GuaHexagram.Parse(\"111111\"));\n",
    "Console.WriteLine(qian.Yong.YaoText);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "上例中，是下载了一个注解仓库，当然也可以直接读取本地文件，或者使用程序集内的资源。然后可以使用 `GetHexagram` 获取到 `ZhouyiHexagram` ，其中包括各种卦辞爻辞。\n",
    "\n",
    "`ZhouyiStore` 的内部维护了一个 `AnnotationStore` （在 [YiJingFramework.Annotating](https://yjfwk.yueyinqiu.top/Annotating/) 中），可以通过它的 `Store` 属性取得内部的仓库。所有和文件相关的操作都是由内部的仓库完成的，而 `ZhouyiStore` 只是访问这个内部仓库来产生 `ZhouyiHexagram` 、 `ZhouyiTrigram` 、 `Xici` 、 `Shuogua` 、 `Xugua` 、 `Zagua` 等对象。 `ZhouyiStore` 可能访问的注解组也提供在了 `Groups` 属性中。不过，除非有特殊要求，一般不建议直接访问内部仓库，而是应该使用 `ZhouyiStore.UpdateStore` 方法。\n",
    "\n",
    "其中，获取到的 `ZhouyiHexagram` 等对象与仓库没有绑定关系。也就是说，对它们的修改不会同步到仓库中，同时仓库的修改不会导致已获取到的对象发生变化。如果要根据生成的对象来修改仓库，可以使用前面提到的 `UpdateStore` 方法，如：\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Store Title\n",
      "Title Store\n",
      "Qian\n",
      "Qian\n",
      "Qian\n",
      "QIAN\n"
     ]
    }
   ],
   "source": [
    "var innerStore = new AnnotationStore();\n",
    "var store = new ZhouyiStore(innerStore);\n",
    "\n",
    "innerStore.Title = \"Store Title\";\n",
    "Console.WriteLine(store.Title);\n",
    "store.Title = \"Title Store\";\n",
    "Console.WriteLine(innerStore.Title);\n",
    "\n",
    "store.Groups.HexagramNameGroup.AddEntry(\"111111\", \"Qian\");\n",
    "\n",
    "var qian1 = store.GetHexagramByName(\"qian\");\n",
    "Debug.Assert(qian1 is not null);\n",
    "Console.WriteLine(qian1.Name);\n",
    "\n",
    "qian1.Name = \"QIAN\";\n",
    "var qian2 = store.GetHexagram(GuaHexagram.Parse(\"111111\"));\n",
    "Console.WriteLine(qian2.Name);\n",
    "store.UpdateStore(qian1);\n",
    "Console.WriteLine(qian2.Name);\n",
    "\n",
    "var qian3 = store.GetHexagram(GuaHexagram.Parse(\"111111\"));\n",
    "Console.WriteLine(qian3.Name);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "没有绑定关系也造成了一些限制，比如我们没法直接将 `ZhouyiHexagram` 拆为两个 `ZhouyiTrigram` ，因为不知道应该由谁来提供注解，因此需要额外传递一个 `ZhouyiStore` ，如：\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Yang\n",
      "乾\n"
     ]
    }
   ],
   "source": [
    "var storeUri = \"https://yueyinqiu.github.io/my-yijing-annotation-stores/975345ca/2023-08-02-1.json\";\n",
    "var httpClient = new HttpClient();\n",
    "var storeString = await httpClient.GetStringAsync(storeUri);\n",
    "var store = ZhouyiStore.DeserializeFromJsonString(storeString);\n",
    "Debug.Assert(store is not null);\n",
    "\n",
    "var qian = store.GetHexagram(GuaHexagram.Parse(\"111111\"));\n",
    "(GuaTrigram upper, _) = qian.SplitToTrigrams();\n",
    "(_, ZhouyiTrigram lower) = qian.SplitToTrigrams(store);\n",
    "Console.WriteLine(upper[0]); // Yang\n",
    "Console.WriteLine(lower.Name); // 乾"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "通常，自己制作一个注解仓库是非常复杂的，正常情况下，我们会使用他人制作好的注解仓库。可以在[这里](./known_annotation_stores.ipynb)找到一些优秀的注解仓库。这些仓库中，通常会包含系辞等内容，但是我们的最终应用里有时候只需要卦爻辞，所以这里给一个清除不需要的注解的方案，从而展示一下相关的功能：\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "> 当然，它不会主动删除 `AnnotationGroup` ，所以修改内部仓库可以让它体积更小。但是不建议这样做。\n",
    "\n",
    "再来一个导出《周易》全文的示例作为收尾吧：\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "# 经、象、彖 上\r\n",
      "\r\n",
      "## 第 01 卦 乾 乾为天 乾上乾下\r\n",
      "\r\n",
      "乾：元亨利贞\r\n",
      "\r\n",
      "象曰：天行健君子以自强不息\r\n",
      "\r\n",
      "彖曰：大哉乾元万物资始乃统天云行雨施品物流形大明终始六位时成时乘六龙以御天乾道变化各正性命保合大和乃利贞首出庶物万国咸宁\r\n",
      "\r\n",
      "初九：潜龙勿用\r\n",
      "\r\n",
      "象曰：潜龙勿用阳在下也\r\n",
      "\r\n",
      "九二：见龙在田利见大人\r\n",
      "\r\n",
      "象曰：见龙在田德施普也\r\n",
      "\r\n",
      "九三：君子终日乾乾夕惕若厉无咎\r\n",
      "\r\n",
      "象曰：终日乾乾反复道也\r\n",
      "\r\n",
      "九四：或跃在渊无咎\r\n",
      "\r\n",
      "象曰：或跃在渊进无咎也\r\n",
      "\r\n",
      "九五：飞龙在天利见大人\r\n",
      "\r\n",
      "象曰：飞龙在天大人造也\r\n",
      "\r\n",
      "上九：亢龙有悔\r\n",
      "\r\n",
      "象曰：亢龙有悔盈不可久也\r\n",
      "\r\n",
      "用九：见群龙无首吉\r\n",
      "\r\n",
      "象曰：用九天德不可为首也\r\n",
      "\r\n",
      "文言：元者善之长也亨者嘉之会也利者义之和也贞者事之干也君子体仁足以长人嘉会足以合礼利物足以和义贞固足以干事君子行此四者故曰乾元亨利贞初九曰潜龙勿用何谓也子曰龙德而隐者也不易乎世不成乎名遁世而无闷不见是而无闷乐则行之忧则违之确乎其不可拔乾龙也九二曰见龙在田利见大人何谓也子曰龙德而正中者也庸言之信庸行之谨闲邪存其诚善世而不伐德博而化易曰见龙在田利见大人君德也九三曰君子终日乾乾夕惕若厉无咎何谓也子曰君子进德修业忠信所以进德也修辞立其诚所以居业也知至至之可与几也知终终之可与存义也是故居上位而不骄在下位而不忧故乾乾因其时而惕虽危而无咎矣九四曰或跃在渊无咎何谓也子曰上下无常非为邪也进退无恒非离群也君子进德修业欲及时也故无咎九五曰飞龙在天利见大人何谓也子曰同声相应同气相求水流湿火就燥云从龙风从虎圣人作而万物睹本乎天者亲上本乎地者亲下则各从其类也上九曰亢龙有悔何谓也子曰贵而无位高而无民贤人在下而无辅是以动而有悔也乾龙勿用下也见龙在田时舍也终日乾乾行事也或跃在渊自试也飞龙在天上治也亢龙有悔穷之灾也乾元用九天下治也乾龙勿用阳气潜藏见龙在田天下文明终日乾乾与时偕行或跃在渊乾道乃革飞龙在天乃位乎天德亢龙有悔与时偕极乾元用九乃见天则乾元者始而亨者也利贞者性情也乾始能以美利利天下不言所利大矣哉大哉乾乎刚健中正纯粹精也六爻发挥旁通情也时乘六龙以御天也云行雨施天下平也君子以成德为行日可见之行也潜之为言也隐而未见行而未成是以君子弗用也君子学以聚之问以辩之宽以居之仁以行之易曰见龙在田利见大人君德也九三重刚而不中上不在天下不在田故乾乾因其时而惕虽危无咎矣九四重刚而不中上不在天下不在田中不在人故或之或之者疑之也故无咎夫大人者与天地合其德与日月合其明与四时合其序与鬼神合其吉凶先天而天弗违后天而奉天时天且弗违而况于人乎况于鬼神乎亢之为言也知进而不知退知存而不知亡知得而不知丧其唯圣人乎知进退存亡而不失其正者其唯圣人乎\r\n",
      "\r\n",
      "## 第 02 卦 坤 坤为地 坤上坤下\r\n",
      "\r\n",
      "坤：元亨利牝马之贞君子有攸往先迷后得主利西南得朋东北丧朋安贞吉\r\n",
      "\r\n",
      "象曰：地势坤君子以厚德载物\r\n",
      "\r\n",
      "彖曰：至哉坤元万物资生乃顺承天坤厚载物德合无疆含弘光大品物咸亨牝马地类行地无疆柔顺利贞君子攸行先迷失道后顺得常西南得朋乃与类行东北丧朋乃终有庆安贞之吉应地无疆\r\n",
      "\r\n",
      "初六：履霜坚冰至\r\n",
      "\r\n",
      "象曰：履霜坚冰阴始凝也驯致其道至坚冰也\r\n",
      "\r\n",
      "六二：直方大不习无不利\r\n",
      "\r\n",
      "象曰：六二之动直以方也不习无不利地道光也\r\n",
      "\r\n",
      "六三：含章可贞或从王事无成有终\r\n",
      "\r\n",
      "象曰：含章可贞以时发也或从王事知光大也\r\n",
      "\r\n",
      "六四：括囊无咎无誉\r\n",
      "\r\n",
      "象曰：括囊无咎慎不害也\r\n",
      "\r\n",
      "六五：黄裳元吉\r\n",
      "\r\n",
      "象曰：黄裳元吉文在中也\r\n",
      "\r\n",
      "上六：龙战于野其血玄黄\r\n",
      "\r\n",
      "象曰：龙战于野其道穷也\r\n",
      "\r\n",
      "用六：利永贞\r\n",
      "\r\n",
      "象曰：用六永贞以大终也\r\n",
      "\r\n",
      "文言：坤至柔而动也刚至静而德方后得主而有常含万物而化光坤道其顺乎承天而时行积善之家必有馀庆积不善之家必有馀殃臣弑其君子弑其父非一朝一夕之故其所由来者渐矣由辩之不早辩也易曰履霜坚冰至盖言顺也直其正也方其义也君子敬以直内义以方外敬义立而德不孤直方大不习无不利则不疑其所行也阴虽有美含之以从王事弗敢成也地道也妻道也臣道也地道无成而代有终也天地变化草木蕃天地闭贤人隐易曰括囊无咎无誉盖言谨也君子黄中通理正位居体美在其中而畅于四支发于事业美之至也阴疑于阳必战为其嫌于无阳也故称龙焉犹未离其类也故称血焉夫玄黄者天地之杂也天玄而地黄\r\n",
      "\r\n",
      "## 第 03 卦 屯 水雷屯 坎上震下\r\n",
      "\r\n",
      "屯：元亨利贞勿用有攸往利建侯\r\n",
      "\r\n",
      "象曰：云雷屯君子以经纶\r\n",
      "\r\n",
      "彖曰：屯刚柔始交而难生动乎险中大亨贞雷雨之动满盈天造草昧宜建侯而不宁\r\n",
      "\r\n",
      "初九：磐桓利居贞利建侯\r\n",
      "\r\n",
      "象曰：虽磐桓志行正也以贵下贱大得民也\r\n",
      "\r\n",
      "六二：屯如邅如乘马班如匪寇婚媾女子贞不字十年乃字\r\n",
      "\r\n",
      "象曰：六二之难乘刚也十年乃字反常也\r\n",
      "\r\n",
      "六三：即鹿无虞惟入于林中君子几不如舍往吝\r\n",
      "\r\n",
      "象曰：即鹿无虞以纵禽也君子舍之往吝穷也\r\n",
      "\r\n",
      "六四：乘马班如求婚媾往吉无不利\r\n",
      "\r\n",
      "象曰：求而往明也\r\n",
      "\r\n",
      "九五：屯其膏小贞吉大贞凶\r\n",
      "\r\n",
      "象曰：屯其膏施未光也\r\n",
      "\r\n",
      "上六：乘马班如泣血涟如\r\n",
      "\r\n",
      "象曰：泣血涟如何可长也\r\n",
      "\r\n",
      "## 第 04 卦 蒙 山水蒙 艮上坎下\r\n",
      "\r\n",
      "蒙：亨匪我求童蒙童蒙求我初噬告再三渎渎则不告利贞\r\n",
      "\r\n",
      "象曰：山下出泉蒙君子以果行育德\r\n",
      "\r\n",
      "彖曰：蒙山下有险险而止蒙蒙亨以亨行时中也匪我求童蒙童蒙求我志应也初噬告以刚中也再三渎渎则不告渎蒙也蒙以养正圣功也\r\n",
      "\r\n",
      "初六：发蒙利用刑人用说桎梏以往吝\r\n",
      "\r\n",
      "象曰：利用刑人以正法也\r\n",
      "\r\n",
      "九二：包蒙吉纳妇吉子克家\r\n",
      "\r\n",
      "象曰：子克家刚柔接也\r\n",
      "\r\n",
      "六三：勿用取女见金夫不有躬无攸利\r\n",
      "\r\n",
      "象曰：勿用取女行不顺也\r\n",
      "\r\n",
      "六四：困蒙吝\r\n",
      "\r\n",
      "象曰：困蒙之吝独远实也\r\n",
      "\r\n",
      "六五：童蒙吉\r\n",
      "\r\n",
      "象曰：童蒙之吉顺以巽也\r\n",
      "\r\n",
      "上九：击蒙不利为寇利御寇\r\n",
      "\r\n",
      "象曰：利用御寇上下顺也\r\n",
      "\r\n",
      "## 第 05 卦 需 水天需 坎上乾下\r\n",
      "\r\n",
      "需：有孚光亨贞吉利涉大川\r\n",
      "\r\n",
      "象曰：云上于天需君子以饮食宴乐\r\n",
      "\r\n",
      "彖曰：需须也险在前也刚健而不陷其义不困穷矣需有孚光亨贞吉位乎天位以正中也利涉大川往有功也\r\n",
      "\r\n",
      "初九：需于郊利用恒无咎\r\n",
      "\r\n",
      "象曰：需于郊不犯难行也利用恒无咎未失常也\r\n",
      "\r\n",
      "九二：需于沙小有言终吉\r\n",
      "\r\n",
      "象曰：需于沙衍在中也虽小有言以终吉也\r\n",
      "\r\n",
      "九三：需于泥致寇至\r\n",
      "\r\n",
      "象曰：需于泥灾在外也自我致寇敬慎不败也\r\n",
      "\r\n",
      "六四：需于血出自穴\r\n",
      "\r\n",
      "象曰：需于血顺以听也\r\n",
      "\r\n",
      "九五：需于酒食贞吉\r\n",
      "\r\n",
      "象曰：酒食贞吉以中正也\r\n",
      "\r\n",
      "上六：入于穴有不速之客三人来敬之终吉\r\n",
      "\r\n",
      "象曰：不速之客来敬之终吉虽不当位未大失也\r\n",
      "\r\n",
      "## 第 06 卦 讼 天水讼 乾上坎下\r\n",
      "\r\n",
      "讼：有孚窒惕中吉终凶利见大人不利涉大川\r\n",
      "\r\n",
      "象曰：天与水违行讼君子以作事谋始\r\n",
      "\r\n",
      "彖曰：讼上刚下险险而健讼讼有孚窒惕中吉刚来而得中也终凶讼不可成也利见大人尚中正也不利涉大川入于渊也\r\n",
      "\r\n",
      "初六：不永所事小有言终吉\r\n",
      "\r\n",
      "象曰：不永所事讼不可长也虽小有言其辩明也\r\n",
      "\r\n",
      "九二：不克讼归而逋其邑人三百户无眚\r\n",
      "\r\n",
      "象曰：不克讼归逋窜也自下讼上患至掇也\r\n",
      "\r\n",
      "六三：食旧德贞厉终吉或从王事无成\r\n",
      "\r\n",
      "象曰：食旧德从上吉也\r\n",
      "\r\n",
      "九四：不克讼复即命渝安贞吉\r\n",
      "\r\n",
      "象曰：复即命渝安贞不失也\r\n",
      "\r\n",
      "九五：讼元吉\r\n",
      "\r\n",
      "象曰：讼元吉以中正也\r\n",
      "\r\n",
      "上九：或锡之鞶带终朝三褫之\r\n",
      "\r\n",
      "象曰：以讼受服亦不足敬也\r\n",
      "\r\n",
      "## 第 07 卦 师 地水师 坤上坎下\r\n",
      "\r\n",
      "师：贞丈人吉无咎\r\n",
      "\r\n",
      "象曰：地中有水师君子以容民畜众\r\n",
      "\r\n",
      "彖曰：师众也贞正也能以众正可以王矣刚中而应行险而顺以此毒天下而民从之吉又何咎矣\r\n",
      "\r\n",
      "初六：师出以律否臧凶\r\n",
      "\r\n",
      "象曰：师出以律失律凶也\r\n",
      "\r\n",
      "九二：在师中吉无咎王三锡命\r\n",
      "\r\n",
      "象曰：在师中吉承天宠也王三锡命怀万邦也\r\n",
      "\r\n",
      "六三：师或舆尸凶\r\n",
      "\r\n",
      "象曰：师或舆尸大无功也\r\n",
      "\r\n",
      "六四：师左次无咎\r\n",
      "\r\n",
      "象曰：左次无咎未失常也\r\n",
      "\r\n",
      "六五：田有禽利执言无咎长子帅师弟子舆尸贞凶\r\n",
      "\r\n",
      "象曰：长子帅师以中行也弟子舆尸使不当也\r\n",
      "\r\n",
      "上六：大君有命开国承家小人勿用\r\n",
      "\r\n",
      "象曰：大君有命以正功也小人勿用必乱邦也\r\n",
      "\r\n",
      "## 第 08 卦 比 水地比 坎上坤下\r\n",
      "\r\n",
      "比：吉原筮元永贞无咎不宁方来后夫凶\r\n",
      "\r\n",
      "象曰：地上有水比先王以建万国亲诸侯\r\n",
      "\r\n",
      "彖曰：比吉也比辅也下顺从也原筮元永贞无咎以刚中也不宁方来上下应也后夫凶其道穷也\r\n",
      "\r\n",
      "初六：有孚比之无咎有孚盈缶终来有他吉\r\n",
      "\r\n",
      "象曰：比之初六有他吉也\r\n",
      "\r\n",
      "六二：比之自内贞吉\r\n",
      "\r\n",
      "象曰：比之自内不自失也\r\n",
      "\r\n",
      "六三：比之匪人\r\n",
      "\r\n",
      "象曰：比之匪人不亦伤乎\r\n",
      "\r\n",
      "六四：外比之贞吉\r\n",
      "\r\n",
      "象曰：外比于贤以从上也\r\n",
      "\r\n",
      "九五：显比王用三驱失前禽邑人不诫吉\r\n",
      "\r\n",
      "象曰：显比之吉位正中也舍逆取顺失前禽也邑人不诫上使中也\r\n",
      "\r\n",
      "上六：比之无首凶\r\n",
      "\r\n",
      "象曰：比之无首无所终也\r\n",
      "\r\n",
      "## 第 09 卦 小畜 风天小畜 巽上乾下\r\n",
      "\r\n",
      "小畜：亨密云不雨自我西郊\r\n",
      "\r\n",
      "象曰：风行天上小畜君子以懿文德\r\n",
      "\r\n",
      "彖曰：小畜柔得位而上下应之曰小畜健而巽刚中而志行乃亨密云不雨尚往也自我西郊施未行也\r\n",
      "\r\n",
      "初九：复自道何其咎吉\r\n",
      "\r\n",
      "象曰：复自道其义吉也\r\n",
      "\r\n",
      "九二：牵复吉\r\n",
      "\r\n",
      "象曰：牵复在中亦不自失也\r\n",
      "\r\n",
      "九三：舆说辐夫妻反目\r\n",
      "\r\n",
      "象曰：夫妻反目不能正室也\r\n",
      "\r\n",
      "六四：有孚血去惕出无咎\r\n",
      "\r\n",
      "象曰：有孚惕出上合志也\r\n",
      "\r\n",
      "九五：有孚挛如富以其邻\r\n",
      "\r\n",
      "象曰：有孚挛如不独富也\r\n",
      "\r\n",
      "上九：既雨既处尚德载妇贞厉月几望君子征凶\r\n",
      "\r\n",
      "象曰：既雨既处德积载也君子征凶有所疑也\r\n",
      "\r\n",
      "## 第 10 卦 履 天泽履 乾上兑下\r\n",
      "\r\n",
      "履：履虎尾不咥人亨\r\n",
      "\r\n",
      "象曰：上天下泽履君子以辨上下定民志\r\n",
      "\r\n",
      "彖曰：履柔履刚也说而应乎乾是以履虎尾不咥人亨刚中正履帝位而不疚光明也\r\n",
      "\r\n",
      "初九：素履往无咎\r\n",
      "\r\n",
      "象曰：素履之往独行愿也\r\n",
      "\r\n",
      "九二：履道坦坦幽人贞吉\r\n",
      "\r\n",
      "象曰：幽人贞吉中不自乱也\r\n",
      "\r\n",
      "六三：眇能视跛能履履虎尾咥人凶武人为于大君\r\n",
      "\r\n",
      "象曰：眇能视不足以有明也跛能履不足以与行也咥人之凶位不当也武人为于大君志刚也\r\n",
      "\r\n",
      "九四：履虎尾愬愬终吉\r\n",
      "\r\n",
      "象曰：愬愬终吉志行也\r\n",
      "\r\n",
      "九五：夬履贞厉\r\n",
      "\r\n",
      "象曰：夬履贞厉位正当也\r\n",
      "\r\n",
      "上九：视履考祥其旋元吉\r\n",
      "\r\n",
      "象曰：元吉在上大有庆也\r\n",
      "\r\n",
      "## 第 11 卦 泰 地天泰 坤上乾下\r\n",
      "\r\n",
      "泰：小往大来吉亨\r\n",
      "\r\n",
      "象曰：天地交泰后以财成天地之道辅相天地之宜以左右民\r\n",
      "\r\n",
      "彖曰：泰小往大来吉亨则是天地交而万物通也上下交而其志同也内阳而外阴内健而外顺内君子而外小人君子道长小人道消也\r\n",
      "\r\n",
      "初九：拔茅茹以其汇征吉\r\n",
      "\r\n",
      "象曰：拔茅征吉志在外也\r\n",
      "\r\n",
      "九二：包荒用冯河不遐遗朋亡得尚于中行\r\n",
      "\r\n",
      "象曰：包荒得尚于中行以光大也\r\n",
      "\r\n",
      "九三：无平不陂无往不复艰贞无咎勿恤其孚于食有福\r\n",
      "\r\n",
      "象曰：无往不复天地际也\r\n",
      "\r\n",
      "六四：翩翩不富以其邻不戒以孚\r\n",
      "\r\n",
      "象曰：翩翩不富皆失实也不戒以孚中心愿也\r\n",
      "\r\n",
      "六五：帝乙归妹以祉元吉\r\n",
      "\r\n",
      "象曰：以祉元吉中以行愿也\r\n",
      "\r\n",
      "上六：城复于隍勿用师自邑告命贞吝\r\n",
      "\r\n",
      "象曰：城复于隍其命乱也\r\n",
      "\r\n",
      "## 第 12 卦 否 天地否 乾上坤下\r\n",
      "\r\n",
      "否：否之匪人不利君子贞大往小来\r\n",
      "\r\n",
      "象曰：天地不交否君子以俭德辟难不可荣以禄\r\n",
      "\r\n",
      "彖曰：否之匪人不利君子贞大往小来则是天地不交而万物不通也上下不交而天下无邦也内阴而外阳内柔而外刚内小人而外君子小人道长君子道消也\r\n",
      "\r\n",
      "初六：拔茅茹以其汇贞吉亨\r\n",
      "\r\n",
      "象曰：拔茅贞吉志在君也\r\n",
      "\r\n",
      "六二：包承小人吉大人否亨\r\n",
      "\r\n",
      "象曰：大人否亨不乱群也\r\n",
      "\r\n",
      "六三：包羞\r\n",
      "\r\n",
      "象曰：包羞位不当也\r\n",
      "\r\n",
      "九四：有命无咎畴离祉\r\n",
      "\r\n",
      "象曰：有命无咎志行也\r\n",
      "\r\n",
      "九五：休否大人吉其亡其亡系于苞桑\r\n",
      "\r\n",
      "象曰：大人之吉位正当也\r\n",
      "\r\n",
      "上九：倾否先否后喜\r\n",
      "\r\n",
      "象曰：否终则倾何可长也\r\n",
      "\r\n",
      "## 第 13 卦 同人 天火同人 乾上离下\r\n",
      "\r\n",
      "同人：同人于野亨利涉大川利君子贞\r\n",
      "\r\n",
      "象曰：天与火同人君子以类族辨物\r\n",
      "\r\n",
      "彖曰：同人柔得位得中而应乎乾曰同人同人曰同人于野亨利涉大川乾行也文明以健中正而应君子正也唯君子为能通天下之志\r\n",
      "\r\n",
      "初九：同人于门无咎\r\n",
      "\r\n",
      "象曰：出门同人又谁咎也\r\n",
      "\r\n",
      "六二：同人于宗吝\r\n",
      "\r\n",
      "象曰：同人于宗吝道也\r\n",
      "\r\n",
      "九三：伏戎于莽升其高陵三岁不兴\r\n",
      "\r\n",
      "象曰：伏戎于莽敌刚也三岁不兴安行也\r\n",
      "\r\n",
      "九四：乘其墉弗克攻吉\r\n",
      "\r\n",
      "象曰：乘其墉义弗克也其吉则困而反则也\r\n",
      "\r\n",
      "九五：同人先号啕而后笑大师克相遇\r\n",
      "\r\n",
      "象曰：同人之先以中直也大师相遇言相克也\r\n",
      "\r\n",
      "上九：同人于郊无悔\r\n",
      "\r\n",
      "象曰：同人于郊志未得也\r\n",
      "\r\n",
      "## 第 14 卦 大有 火天大有 离上乾下\r\n",
      "\r\n",
      "大有：元亨\r\n",
      "\r\n",
      "象曰：火在天上大有君子以遏恶扬善顺天休命\r\n",
      "\r\n",
      "彖曰：大有柔得尊位大中而上下应之曰大有其德刚健而文明应乎天而时行是以元亨\r\n",
      "\r\n",
      "初九：无交害匪咎艰则无咎\r\n",
      "\r\n",
      "象曰：大有初九无交害也\r\n",
      "\r\n",
      "九二：大车以载有攸往无咎\r\n",
      "\r\n",
      "象曰：大车以载积中不败也\r\n",
      "\r\n",
      "九三：公用亨于天子小人弗克\r\n",
      "\r\n",
      "象曰：公用亨于天子小人害也\r\n",
      "\r\n",
      "九四：匪其彭无咎\r\n",
      "\r\n",
      "象曰：匪其彭无咎明辨晰也\r\n",
      "\r\n",
      "六五：厥孚交如威如吉\r\n",
      "\r\n",
      "象曰：厥孚交如信以发志也威如之吉易而无备也\r\n",
      "\r\n",
      "上九：自天佑之吉无不利\r\n",
      "\r\n",
      "象曰：大有上吉自天佑也\r\n",
      "\r\n",
      "## 第 15 卦 谦 地山谦 坤上艮下\r\n",
      "\r\n",
      "谦：亨君子有终\r\n",
      "\r\n",
      "象曰：地中有山谦君子以裒多益寡称物平施\r\n",
      "\r\n",
      "彖曰：谦亨天道下济而光明地道卑而上行天道亏盈而益谦地道变盈而流谦鬼神害盈而福谦人道恶盈而好谦谦尊而光卑而不可逾君子之终也\r\n",
      "\r\n",
      "初六：谦谦君子用涉大川吉\r\n",
      "\r\n",
      "象曰：谦谦君子卑以自牧也\r\n",
      "\r\n",
      "六二：鸣谦贞吉\r\n",
      "\r\n",
      "象曰：鸣谦贞吉中心得也\r\n",
      "\r\n",
      "九三：劳谦君子有终吉\r\n",
      "\r\n",
      "象曰：劳谦君子万民服也\r\n",
      "\r\n",
      "六四：无不利撝谦\r\n",
      "\r\n",
      "象曰：无不利撝谦不违则也\r\n",
      "\r\n",
      "六五：不富以其邻利用侵伐无不利\r\n",
      "\r\n",
      "象曰：利用侵伐征不服也\r\n",
      "\r\n",
      "上六：鸣谦利用行师征邑国\r\n",
      "\r\n",
      "象曰：鸣谦志未得也可用行师征邑国也\r\n",
      "\r\n",
      "## 第 16 卦 豫 雷地豫 震上坤下\r\n",
      "\r\n",
      "豫：利建侯行师\r\n",
      "\r\n",
      "象曰：雷出地奋豫先王以作乐崇德殷荐之上帝以配祖考\r\n",
      "\r\n",
      "彖曰：豫刚应而志行顺以动豫豫顺以动故天地如之而况建侯行师乎天地以顺动故日月不过而四时不忒圣人以顺动则刑罚清而民服豫之时义大矣哉\r\n",
      "\r\n",
      "初六：鸣豫凶\r\n",
      "\r\n",
      "象曰：初六鸣豫志穷凶也\r\n",
      "\r\n",
      "六二：介于石不终日贞吉\r\n",
      "\r\n",
      "象曰：不终日贞吉以中正也\r\n",
      "\r\n",
      "六三：盱豫悔迟有悔\r\n",
      "\r\n",
      "象曰：盱豫有悔位不当也\r\n",
      "\r\n",
      "九四：由豫大有得勿疑朋盍簪\r\n",
      "\r\n",
      "象曰：由豫大有得志大行也\r\n",
      "\r\n",
      "六五：贞疾恒不死\r\n",
      "\r\n",
      "象曰：六五贞疾乘刚也恒不死中未亡也\r\n",
      "\r\n",
      "上六：冥豫成有渝无咎\r\n",
      "\r\n",
      "象曰：冥豫在上何可长也\r\n",
      "\r\n",
      "## 第 17 卦 随 泽雷随 兑上震下\r\n",
      "\r\n",
      "随：元亨利贞无咎\r\n",
      "\r\n",
      "象曰：泽中有雷随君子以向晦入宴息\r\n",
      "\r\n",
      "彖曰：随刚来而下柔动而说随大亨贞无咎而天下随时随之时义大矣哉\r\n",
      "\r\n",
      "初九：官有渝贞吉出门交有功\r\n",
      "\r\n",
      "象曰：官有渝从正吉也出门交有功不失也\r\n",
      "\r\n",
      "六二：系小子失丈夫\r\n",
      "\r\n",
      "象曰：系小子弗兼与也\r\n",
      "\r\n",
      "六三：系丈夫失小子随有求得利居贞\r\n",
      "\r\n",
      "象曰：系丈夫志舍下也\r\n",
      "\r\n",
      "九四：随有获贞凶有孚在道以明何咎\r\n",
      "\r\n",
      "象曰：随有获其义凶也有孚在道明功也\r\n",
      "\r\n",
      "九五：孚于嘉吉\r\n",
      "\r\n",
      "象曰：孚于嘉吉位正中也\r\n",
      "\r\n",
      "上六：拘系之乃从维之王用亨于西山\r\n",
      "\r\n",
      "象曰：拘系之上穷也\r\n",
      "\r\n",
      "## 第 18 卦 蛊 山风蛊 艮上巽下\r\n",
      "\r\n",
      "蛊：元亨利涉大川先甲三日后甲三日\r\n",
      "\r\n",
      "象曰：山下有风蛊君子以振民育德\r\n",
      "\r\n",
      "彖曰：蛊刚上而柔下巽而止蛊蛊元亨而天下治也利涉大川往有事也先甲三日后甲三日终则有始天行也\r\n",
      "\r\n",
      "初六：干父之蛊有子考无咎厉终吉\r\n",
      "\r\n",
      "象曰：干父之蛊意承考也\r\n",
      "\r\n",
      "九二：干母之蛊不可贞\r\n",
      "\r\n",
      "象曰：干母之蛊得中道也\r\n",
      "\r\n",
      "九三：干父之蛊小有悔无大咎\r\n",
      "\r\n",
      "象曰：干父之蛊终无咎也\r\n",
      "\r\n",
      "六四：裕父之蛊往见吝\r\n",
      "\r\n",
      "象曰：裕父之蛊往未得也\r\n",
      "\r\n",
      "六五：干父之蛊用誉\r\n",
      "\r\n",
      "象曰：干父之蛊承以德也\r\n",
      "\r\n",
      "上九：不事王侯高尚其事\r\n",
      "\r\n",
      "象曰：不事王侯志可则也\r\n",
      "\r\n",
      "## 第 19 卦 临 地泽临 坤上兑下\r\n",
      "\r\n",
      "临：元亨利贞至于八月有凶\r\n",
      "\r\n",
      "象曰：泽上有地临君子以教思无穷容保民无疆\r\n",
      "\r\n",
      "彖曰：临刚浸而长说而顺刚中而应大亨以正天之道也至于八月有凶消不久也\r\n",
      "\r\n",
      "初九：咸临贞吉\r\n",
      "\r\n",
      "象曰：咸临贞吉志行正也\r\n",
      "\r\n",
      "九二：咸临吉无不利\r\n",
      "\r\n",
      "象曰：咸临吉无不利未顺命也\r\n",
      "\r\n",
      "六三：甘临无攸利既忧之无咎\r\n",
      "\r\n",
      "象曰：甘临位不当也既忧之咎不长也\r\n",
      "\r\n",
      "六四：至临无咎\r\n",
      "\r\n",
      "象曰：至临无咎位当也\r\n",
      "\r\n",
      "六五：知临大君之宜吉\r\n",
      "\r\n",
      "象曰：大君之宜行中之谓也\r\n",
      "\r\n",
      "上六：敦临吉无咎\r\n",
      "\r\n",
      "象曰：敦临之吉志在内也\r\n",
      "\r\n",
      "## 第 20 卦 观 风地观 巽上坤下\r\n",
      "\r\n",
      "观：盥而不荐有孚颙若\r\n",
      "\r\n",
      "象曰：风行地上观先王以省方观民设教\r\n",
      "\r\n",
      "彖曰：大观在上顺而巽中正以观天下观盥而不荐有孚颙若下观而化也观天之神道而四时不忒圣人以神道设教而天下服矣\r\n",
      "\r\n",
      "初六：童观小人无咎君子吝\r\n",
      "\r\n",
      "象曰：初六童观小人道也\r\n",
      "\r\n",
      "六二：窥观利女贞\r\n",
      "\r\n",
      "象曰：窥观女贞亦可丑也\r\n",
      "\r\n",
      "六三：观我生进退\r\n",
      "\r\n",
      "象曰：观我生进退未失道也\r\n",
      "\r\n",
      "六四：观国之光利用宾于王\r\n",
      "\r\n",
      "象曰：观国之光尚宾也\r\n",
      "\r\n",
      "九五：观我生君子无咎\r\n",
      "\r\n",
      "象曰：观我生观民也\r\n",
      "\r\n",
      "上九：观其生君子无咎\r\n",
      "\r\n",
      "象曰：观其生志未平也\r\n",
      "\r\n",
      "## 第 21 卦 噬嗑 火雷噬嗑 离上震下\r\n",
      "\r\n",
      "噬嗑：亨利用狱\r\n",
      "\r\n",
      "象曰：雷电噬嗑先王以明罚敕法\r\n",
      "\r\n",
      "彖曰：颐中有物曰噬嗑噬嗑而亨刚柔分动而明雷电合而章柔得中而上行虽不当位利用狱也\r\n",
      "\r\n",
      "初九：履校灭趾无咎\r\n",
      "\r\n",
      "象曰：履校灭趾不行也\r\n",
      "\r\n",
      "六二：噬肤灭鼻无咎\r\n",
      "\r\n",
      "象曰：噬肤灭鼻乘刚也\r\n",
      "\r\n",
      "六三：噬腊肉遇毒小吝无咎\r\n",
      "\r\n",
      "象曰：遇毒位不当也\r\n",
      "\r\n",
      "九四：噬干胏得金矢利艰贞吉\r\n",
      "\r\n",
      "象曰：利艰贞吉未光也\r\n",
      "\r\n",
      "六五：噬干肉得黄金贞厉无咎\r\n",
      "\r\n",
      "象曰：贞厉无咎得当也\r\n",
      "\r\n",
      "上九：何校灭耳凶\r\n",
      "\r\n",
      "象曰：何校灭耳聪不明也\r\n",
      "\r\n",
      "## 第 22 卦 贲 山火贲 艮上离下\r\n",
      "\r\n",
      "贲：亨小利有攸往\r\n",
      "\r\n",
      "象曰：山下有火贲君子以明庶政无敢折狱\r\n",
      "\r\n",
      "彖曰：贲亨柔来而文刚故亨分刚上而文柔故小利有攸往刚柔交错天文也文明以止人文也观乎天文以察时变观乎人文以化成天下\r\n",
      "\r\n",
      "初九：贲其趾舍车而徒\r\n",
      "\r\n",
      "象曰：舍车而徒义弗乘也\r\n",
      "\r\n",
      "六二：贲其须\r\n",
      "\r\n",
      "象曰：贲其须与上兴也\r\n",
      "\r\n",
      "九三：贲如濡如永贞吉\r\n",
      "\r\n",
      "象曰：永贞之吉终莫之陵也\r\n",
      "\r\n",
      "六四：贲如皤如白马翰如匪寇婚媾\r\n",
      "\r\n",
      "象曰：六四当位疑也匪寇婚媾终无尤也\r\n",
      "\r\n",
      "六五：贲于丘园束帛戋戋吝终吉\r\n",
      "\r\n",
      "象曰：六五之吉有喜也\r\n",
      "\r\n",
      "上九：白贲无咎\r\n",
      "\r\n",
      "象曰：白贲无咎上得志也\r\n",
      "\r\n",
      "## 第 23 卦 剥 山地剥 艮上坤下\r\n",
      "\r\n",
      "剥：不利有攸往\r\n",
      "\r\n",
      "象曰：山附于地剥上以厚下安宅\r\n",
      "\r\n",
      "彖曰：剥剥也柔变刚也不利有攸往小人长也顺而止之观象也君子尚消息盈虚天行也\r\n",
      "\r\n",
      "初六：剥床以足蔑贞凶\r\n",
      "\r\n",
      "象曰：剥床以足以灭下也\r\n",
      "\r\n",
      "六二：剥床以辨蔑贞凶\r\n",
      "\r\n",
      "象曰：剥床以辨未有与也\r\n",
      "\r\n",
      "六三：剥之无咎\r\n",
      "\r\n",
      "象曰：剥之无咎失上下也\r\n",
      "\r\n",
      "六四：剥床以肤凶\r\n",
      "\r\n",
      "象曰：剥床以肤切近灾也\r\n",
      "\r\n",
      "六五：贯鱼以宫人宠无不利\r\n",
      "\r\n",
      "象曰：以宫人宠终无尤也\r\n",
      "\r\n",
      "上九：硕果不食君子得舆小人剥庐\r\n",
      "\r\n",
      "象曰：君子得舆民所载也小人剥庐终不可用也\r\n",
      "\r\n",
      "## 第 24 卦 复 地雷复 坤上震下\r\n",
      "\r\n",
      "复：亨出入无疾朋来无咎反复其道七日来复利有攸往\r\n",
      "\r\n",
      "象曰：雷在地中复先王以至日闭关商旅不行后不省方\r\n",
      "\r\n",
      "彖曰：复亨刚反动而以顺行是以出入无疾朋来无咎反复其道七日来复天行也利有攸往刚长也复其见天地之心乎\r\n",
      "\r\n",
      "初九：不远复无祗悔元吉\r\n",
      "\r\n",
      "象曰：不远之复以修身也\r\n",
      "\r\n",
      "六二：休复吉\r\n",
      "\r\n",
      "象曰：休复之吉以下仁也\r\n",
      "\r\n",
      "六三：频复厉无咎\r\n",
      "\r\n",
      "象曰：频复之厉义无咎也\r\n",
      "\r\n",
      "六四：中行独复\r\n",
      "\r\n",
      "象曰：中行独复以从道也\r\n",
      "\r\n",
      "六五：敦复无悔\r\n",
      "\r\n",
      "象曰：敦复无悔中以自考也\r\n",
      "\r\n",
      "上六：迷复凶有灾眚用行师终有大败以其国君凶至于十年不克征\r\n",
      "\r\n",
      "象曰：迷复之凶反君道也\r\n",
      "\r\n",
      "## 第 25 卦 无妄 天雷无妄 乾上震下\r\n",
      "\r\n",
      "无妄：元亨利贞其匪正有眚不利有攸往\r\n",
      "\r\n",
      "象曰：天下雷行物与无妄先王以茂对时育万物\r\n",
      "\r\n",
      "彖曰：无妄刚自外来而为主于内动而健刚中而应大亨以正天之命也其匪正有眚不利有攸往无妄之往何之矣天命不佑行矣哉\r\n",
      "\r\n",
      "初九：无妄往吉\r\n",
      "\r\n",
      "象曰：无妄之往得志也\r\n",
      "\r\n",
      "六二：不耕获不菑畬则利有攸往\r\n",
      "\r\n",
      "象曰：不耕获未富也\r\n",
      "\r\n",
      "六三：无妄之灾或系之牛行人之得邑人之灾\r\n",
      "\r\n",
      "象曰：行人得牛邑人灾也\r\n",
      "\r\n",
      "九四：可贞无咎\r\n",
      "\r\n",
      "象曰：可贞无咎固有之也\r\n",
      "\r\n",
      "九五：无妄之疾勿药有喜\r\n",
      "\r\n",
      "象曰：无妄之药不可试也\r\n",
      "\r\n",
      "上九：无妄行有眚无攸利\r\n",
      "\r\n",
      "象曰：无妄之行穷之灾也\r\n",
      "\r\n",
      "## 第 26 卦 大畜 山天大畜 艮上乾下\r\n",
      "\r\n",
      "大畜：利贞不家食吉利涉大川\r\n",
      "\r\n",
      "象曰：天在山中大畜君子以多识前言往行以畜其德\r\n",
      "\r\n",
      "彖曰：大畜刚健笃实辉光日新其德刚上而尚贤能止健大正也不家食吉养贤也利涉大川应乎天也\r\n",
      "\r\n",
      "初九：有厉利已\r\n",
      "\r\n",
      "象曰：有厉利已不犯灾也\r\n",
      "\r\n",
      "九二：舆说辐\r\n",
      "\r\n",
      "象曰：舆说辐中无尤也\r\n",
      "\r\n",
      "九三：良马逐利艰贞曰闲舆卫利有攸往\r\n",
      "\r\n",
      "象曰：利有攸往上合志也\r\n",
      "\r\n",
      "六四：童牛之牿元吉\r\n",
      "\r\n",
      "象曰：六四元吉有喜也\r\n",
      "\r\n",
      "六五：豮豕之牙吉\r\n",
      "\r\n",
      "象曰：六五之吉有庆也\r\n",
      "\r\n",
      "上九：何天之衢亨\r\n",
      "\r\n",
      "象曰：何天之衢道大行也\r\n",
      "\r\n",
      "## 第 27 卦 颐 山雷颐 艮上震下\r\n",
      "\r\n",
      "颐：贞吉观颐自求口实\r\n",
      "\r\n",
      "象曰：山下有雷颐君子以慎言语节饮食\r\n",
      "\r\n",
      "彖曰：颐贞吉养正则吉也观颐观其所养也自求口实观其自养也天地养万物圣人养贤以及万民颐之时义大矣哉\r\n",
      "\r\n",
      "初九：舍尔灵龟观我朵颐凶\r\n",
      "\r\n",
      "象曰：观我朵颐亦不足贵也\r\n",
      "\r\n",
      "六二：颠颐拂经于丘颐征凶\r\n",
      "\r\n",
      "象曰：六二征凶行失类也\r\n",
      "\r\n",
      "六三：拂颐贞凶十年勿用无攸利\r\n",
      "\r\n",
      "象曰：十年勿用道大悖也\r\n",
      "\r\n",
      "六四：颠颐吉虎视眈眈其欲逐逐无咎\r\n",
      "\r\n",
      "象曰：颠颐之吉上施光也\r\n",
      "\r\n",
      "六五：拂经居贞吉不可涉大川\r\n",
      "\r\n",
      "象曰：居贞之吉顺以从上也\r\n",
      "\r\n",
      "上九：由颐厉吉利涉大川\r\n",
      "\r\n",
      "象曰：由颐厉吉大有庆也\r\n",
      "\r\n",
      "## 第 28 卦 大过 泽风大过 兑上巽下\r\n",
      "\r\n",
      "大过：栋桡利有攸往亨\r\n",
      "\r\n",
      "象曰：泽灭木大过君子以独立不惧遁世无闷\r\n",
      "\r\n",
      "彖曰：大过大者过也栋桡本末弱也刚过而中巽而说行利有攸往乃亨大过之时义大矣哉\r\n",
      "\r\n",
      "初六：藉用白茅无咎\r\n",
      "\r\n",
      "象曰：藉用白茅柔在下也\r\n",
      "\r\n",
      "九二：枯杨生稊老夫得其女妻无不利\r\n",
      "\r\n",
      "象曰：老夫女妻过以相与也\r\n",
      "\r\n",
      "九三：栋桡凶\r\n",
      "\r\n",
      "象曰：栋桡之凶不可以有辅也\r\n",
      "\r\n",
      "九四：栋隆吉有它吝\r\n",
      "\r\n",
      "象曰：栋隆之吉不桡乎下也\r\n",
      "\r\n",
      "九五：枯杨生华老妇得其士夫无咎无誉\r\n",
      "\r\n",
      "象曰：枯杨生华何可久也老妇士夫亦可丑也\r\n",
      "\r\n",
      "上六：过涉灭顶凶无咎\r\n",
      "\r\n",
      "象曰：过涉之凶不可咎也\r\n",
      "\r\n",
      "## 第 29 卦 习坎 习坎为水 坎上坎下\r\n",
      "\r\n",
      "习坎：有孚维心亨行有尚\r\n",
      "\r\n",
      "象曰：水洊至习坎君子以常德行习教事\r\n",
      "\r\n",
      "彖曰：习坎重险也水流而不盈行险而不失其信维心亨乃以刚中也行有尚往有功也天险不可升也地险山川丘陵也王公设险以守其国险之时用大矣哉\r\n",
      "\r\n",
      "初六：习坎入于坎窞凶\r\n",
      "\r\n",
      "象曰：习坎入坎失道凶也\r\n",
      "\r\n",
      "九二：坎有险求小得\r\n",
      "\r\n",
      "象曰：求小得未出中也\r\n",
      "\r\n",
      "六三：来之坎坎险且枕入于坎窞勿用\r\n",
      "\r\n",
      "象曰：来之坎坎终无功也\r\n",
      "\r\n",
      "六四：樽酒簋贰用缶纳约自牖终无咎\r\n",
      "\r\n",
      "象曰：樽酒簋贰刚柔际也\r\n",
      "\r\n",
      "九五：坎不盈祗既平无咎\r\n",
      "\r\n",
      "象曰：坎不盈中未大也\r\n",
      "\r\n",
      "上六：系用徽纆窴于丛棘三岁不得凶\r\n",
      "\r\n",
      "象曰：上六失道凶三岁也\r\n",
      "\r\n",
      "## 第 30 卦 离 离为火 离上离下\r\n",
      "\r\n",
      "离：利贞亨畜牝牛吉\r\n",
      "\r\n",
      "象曰：明两作离大人以继明照于四方\r\n",
      "\r\n",
      "彖曰：离丽也日月丽乎天百谷草木丽乎土重明以丽乎正乃化成天下柔丽乎中正故亨是以畜牝牛吉也\r\n",
      "\r\n",
      "初九：履错然敬之无咎\r\n",
      "\r\n",
      "象曰：履错之敬以辟咎也\r\n",
      "\r\n",
      "六二：黄离元吉\r\n",
      "\r\n",
      "象曰：黄离元吉得中道也\r\n",
      "\r\n",
      "九三：日昃之离不鼓缶而歌则大耋之嗟凶\r\n",
      "\r\n",
      "象曰：日昃之离何可久也\r\n",
      "\r\n",
      "九四：突如其来如焚如死如弃如\r\n",
      "\r\n",
      "象曰：突如其来如无所容也\r\n",
      "\r\n",
      "六五：出涕沱若戚嗟若吉\r\n",
      "\r\n",
      "象曰：六五之吉离王公也\r\n",
      "\r\n",
      "上九：王用出征有嘉折首获匪其丑无咎\r\n",
      "\r\n",
      "象曰：王用出征以正邦也\r\n",
      "\r\n",
      "# 经、象、彖 下\r\n",
      "\r\n",
      "## 第 31 卦 咸 泽山咸 兑上艮下\r\n",
      "\r\n",
      "咸：亨利贞取女吉\r\n",
      "\r\n",
      "象曰：山上有泽咸君子以虚受人\r\n",
      "\r\n",
      "彖曰：咸感也柔上而刚下二气感应以相与止而说男下女是以亨利贞取女吉也天地感而万物化生圣人感人心而天下和平观其所感而天地万物之情可见矣\r\n",
      "\r\n",
      "初六：咸其拇\r\n",
      "\r\n",
      "象曰：咸其拇志在外也\r\n",
      "\r\n",
      "六二：咸其腓凶居吉\r\n",
      "\r\n",
      "象曰：虽凶居吉顺不害也\r\n",
      "\r\n",
      "九三：咸其股执其随往吝\r\n",
      "\r\n",
      "象曰：咸其股亦不处也志在随人所执下也\r\n",
      "\r\n",
      "九四：贞吉悔亡憧憧往来朋从尔思\r\n",
      "\r\n",
      "象曰：贞吉悔亡未感害也憧憧往来未光大也\r\n",
      "\r\n",
      "九五：咸其脢无悔\r\n",
      "\r\n",
      "象曰：咸其脢志末也\r\n",
      "\r\n",
      "上六：咸其辅颊舌\r\n",
      "\r\n",
      "象曰：咸其辅颊舌滕口说也\r\n",
      "\r\n",
      "## 第 32 卦 恒 雷风恒 震上巽下\r\n",
      "\r\n",
      "恒：亨无咎利贞利有攸往\r\n",
      "\r\n",
      "象曰：雷风恒君子以立不易方\r\n",
      "\r\n",
      "彖曰：恒久也刚上而柔下雷风相与巽而动刚柔皆应恒恒亨无咎利贞久于其道也天地之道恒久而不已也利有攸往终则有始也日月得天而能久照四时变化而能久成圣人久于其道而天下化成观其所恒而天地万物之情可见矣\r\n",
      "\r\n",
      "初六：浚恒贞凶无攸利\r\n",
      "\r\n",
      "象曰：浚恒之凶始求深也\r\n",
      "\r\n",
      "九二：悔亡\r\n",
      "\r\n",
      "象曰：九二悔亡能久中也\r\n",
      "\r\n",
      "九三：不恒其德或承之羞贞吝\r\n",
      "\r\n",
      "象曰：不恒其德无所容也\r\n",
      "\r\n",
      "九四：田无禽\r\n",
      "\r\n",
      "象曰：久非其位安得禽也\r\n",
      "\r\n",
      "六五：恒其德贞妇人吉夫子凶\r\n",
      "\r\n",
      "象曰：妇人贞吉从一而终也夫子制义从妇凶也\r\n",
      "\r\n",
      "上六：振恒凶\r\n",
      "\r\n",
      "象曰：振恒在上大无功也\r\n",
      "\r\n",
      "## 第 33 卦 遁 天山遁 乾上艮下\r\n",
      "\r\n",
      "遁：亨小利贞\r\n",
      "\r\n",
      "象曰：天下有山遁君子以远小人不恶而严\r\n",
      "\r\n",
      "彖曰：遁亨遁而亨也刚当位而应与时行也小利贞浸而长也遁之时义大矣哉\r\n",
      "\r\n",
      "初六：遁尾厉勿用有攸往\r\n",
      "\r\n",
      "象曰：遁尾之厉不往何灾也\r\n",
      "\r\n",
      "六二：执之用黄牛之革莫之胜说\r\n",
      "\r\n",
      "象曰：执用黄牛固志也\r\n",
      "\r\n",
      "九三：系遁有疾厉畜臣妾吉\r\n",
      "\r\n",
      "象曰：系遁之厉有疾惫也畜臣妾吉不可大事也\r\n",
      "\r\n",
      "九四：好遁君子吉小人否\r\n",
      "\r\n",
      "象曰：君子好遁小人否也\r\n",
      "\r\n",
      "九五：嘉遁贞吉\r\n",
      "\r\n",
      "象曰：嘉遁贞吉以正志也\r\n",
      "\r\n",
      "上九：肥遁无不利\r\n",
      "\r\n",
      "象曰：肥遁无不利无所疑也\r\n",
      "\r\n",
      "## 第 34 卦 大壮 雷天大壮 震上乾下\r\n",
      "\r\n",
      "大壮：利贞\r\n",
      "\r\n",
      "象曰：雷在天上大壮君子以非礼弗履\r\n",
      "\r\n",
      "彖曰：大壮大者壮也刚以动故壮大壮利贞大者正也正大而天地之情可见矣\r\n",
      "\r\n",
      "初九：壮于趾征凶有孚\r\n",
      "\r\n",
      "象曰：壮于趾其孚穷也\r\n",
      "\r\n",
      "九二：贞吉\r\n",
      "\r\n",
      "象曰：九二贞吉以中也\r\n",
      "\r\n",
      "九三：小人用壮君子用罔贞厉羝羊触藩羸其角\r\n",
      "\r\n",
      "象曰：小人用壮君子罔也\r\n",
      "\r\n",
      "九四：贞吉悔亡藩决不羸壮于大舆之輹\r\n",
      "\r\n",
      "象曰：藩决不羸尚往也\r\n",
      "\r\n",
      "六五：丧羊于易无悔\r\n",
      "\r\n",
      "象曰：丧羊于易位不当也\r\n",
      "\r\n",
      "上六：羝羊触藩不能退不能遂无攸利艰则吉\r\n",
      "\r\n",
      "象曰：不能退不能遂不祥也艰则吉咎不长也\r\n",
      "\r\n",
      "## 第 35 卦 晋 火地晋 离上坤下\r\n",
      "\r\n",
      "晋：康侯用锡马蕃庶昼日三接\r\n",
      "\r\n",
      "象曰：明出地上晋君子以自昭明德\r\n",
      "\r\n",
      "彖曰：晋进也明出地上顺而丽乎大明柔进而上行是以康侯用锡马蕃庶昼日三接也\r\n",
      "\r\n",
      "初六：晋如摧如贞吉罔孚裕无咎\r\n",
      "\r\n",
      "象曰：晋如摧如独行正也裕无咎未受命也\r\n",
      "\r\n",
      "六二：晋如愁如贞吉受兹介福于其王母\r\n",
      "\r\n",
      "象曰：受兹介福以中正也\r\n",
      "\r\n",
      "六三：众允悔亡\r\n",
      "\r\n",
      "象曰：众允之志上行也\r\n",
      "\r\n",
      "九四：晋如硕鼠贞厉\r\n",
      "\r\n",
      "象曰：硕鼠贞厉位不当也\r\n",
      "\r\n",
      "六五：悔亡失得勿恤往吉无不利\r\n",
      "\r\n",
      "象曰：失得勿恤往有庆也\r\n",
      "\r\n",
      "上九：晋其角维用伐邑厉吉无咎贞吝\r\n",
      "\r\n",
      "象曰：维用伐邑道未光也\r\n",
      "\r\n",
      "## 第 36 卦 明夷 地火明夷 坤上离下\r\n",
      "\r\n",
      "明夷：利艰贞\r\n",
      "\r\n",
      "象曰：明入地中明夷君子以莅众用晦而明\r\n",
      "\r\n",
      "彖曰：明入地中明夷内文明而外柔顺以蒙大难文王以之利艰贞晦其明也内难而能正其志箕子以之\r\n",
      "\r\n",
      "初九：明夷于飞垂其翼君子于行三日不食有攸往主人有言\r\n",
      "\r\n",
      "象曰：君子于行义不食也\r\n",
      "\r\n",
      "六二：明夷夷于左股用拯马壮吉\r\n",
      "\r\n",
      "象曰：六二之吉顺以则也\r\n",
      "\r\n",
      "九三：明夷于南狩得其大首不可疾贞\r\n",
      "\r\n",
      "象曰：南狩之志乃大得也\r\n",
      "\r\n",
      "六四：入于左腹获明夷之心于出门庭\r\n",
      "\r\n",
      "象曰：入于左腹获心意也\r\n",
      "\r\n",
      "六五：箕子之明夷利贞\r\n",
      "\r\n",
      "象曰：箕子之贞明不可息也\r\n",
      "\r\n",
      "上六：不明晦初登于天后入于地\r\n",
      "\r\n",
      "象曰：初登于天照四国也后入于地失则也\r\n",
      "\r\n",
      "## 第 37 卦 家人 风火家人 巽上离下\r\n",
      "\r\n",
      "家人：利女贞\r\n",
      "\r\n",
      "象曰：风自火出家人君子以言有物而行有恒\r\n",
      "\r\n",
      "彖曰：家人女正位乎内男正位乎外男女正天地之大义也家人有严君焉父母之谓也父父子子兄兄弟弟夫夫妇妇而家道正正家而天下定矣\r\n",
      "\r\n",
      "初九：闲有家悔亡\r\n",
      "\r\n",
      "象曰：闲有家志未变也\r\n",
      "\r\n",
      "六二：无攸遂在中馈贞吉\r\n",
      "\r\n",
      "象曰：六二之吉顺以巽也\r\n",
      "\r\n",
      "九三：家人嗃嗃悔厉吉妇子嘻嘻终吝\r\n",
      "\r\n",
      "象曰：家人嗃嗃未失也妇子嘻嘻失家节也\r\n",
      "\r\n",
      "六四：富家大吉\r\n",
      "\r\n",
      "象曰：富家大吉顺在位也\r\n",
      "\r\n",
      "九五：王假有家勿恤吉\r\n",
      "\r\n",
      "象曰：王假有家交相爱也\r\n",
      "\r\n",
      "上九：有孚威如终吉\r\n",
      "\r\n",
      "象曰：威如之吉反身之谓也\r\n",
      "\r\n",
      "## 第 38 卦 睽 火泽睽 离上兑下\r\n",
      "\r\n",
      "睽：小事吉\r\n",
      "\r\n",
      "象曰：上火下泽睽君子以同而异\r\n",
      "\r\n",
      "彖曰：睽火动而上泽动而下二女同居其志不同行说而丽乎明柔进而上行得中而应乎刚是以小事吉天地睽而其事同也男女睽而其志通也万物睽而其事类也睽之时用大矣哉\r\n",
      "\r\n",
      "初九：悔亡丧马勿逐自复见恶人无咎\r\n",
      "\r\n",
      "象曰：见恶人以辟咎也\r\n",
      "\r\n",
      "九二：遇主于巷无咎\r\n",
      "\r\n",
      "象曰：遇主于巷未失道也\r\n",
      "\r\n",
      "六三：见舆曳其牛掣其人天且劓无初有终\r\n",
      "\r\n",
      "象曰：见舆曳位不当也无初有终遇刚也\r\n",
      "\r\n",
      "九四：睽孤遇元夫交孚厉无咎\r\n",
      "\r\n",
      "象曰：交孚无咎志行也\r\n",
      "\r\n",
      "六五：悔亡厥宗噬肤往何咎\r\n",
      "\r\n",
      "象曰：厥宗噬肤往有庆也\r\n",
      "\r\n",
      "上九：睽孤见豕负涂载鬼一车先张之弧后说之弧匪寇婚媾往遇雨则吉\r\n",
      "\r\n",
      "象曰：遇雨之吉群疑亡也\r\n",
      "\r\n",
      "## 第 39 卦 蹇 水山蹇 坎上艮下\r\n",
      "\r\n",
      "蹇：利西南不利东北利见大人贞吉\r\n",
      "\r\n",
      "象曰：山上有水蹇君子以反身修德\r\n",
      "\r\n",
      "彖曰：蹇难也险在前也见险而能止知矣哉蹇利西南往得中也不利东北其道穷也利见大人往有功也当位贞吉以正邦也蹇之时用大矣哉\r\n",
      "\r\n",
      "初六：往蹇来誉\r\n",
      "\r\n",
      "象曰：往蹇来誉宜待也\r\n",
      "\r\n",
      "六二：王臣蹇蹇匪躬之故\r\n",
      "\r\n",
      "象曰：王臣蹇蹇终无尤也\r\n",
      "\r\n",
      "九三：往蹇来反\r\n",
      "\r\n",
      "象曰：往蹇来反内喜之也\r\n",
      "\r\n",
      "六四：往蹇来连\r\n",
      "\r\n",
      "象曰：往蹇来连当位实也\r\n",
      "\r\n",
      "九五：大蹇朋来\r\n",
      "\r\n",
      "象曰：大蹇朋来以中节也\r\n",
      "\r\n",
      "上六：往蹇来硕吉利见大人\r\n",
      "\r\n",
      "象曰：往蹇来硕志在内也利见大人以从贵也\r\n",
      "\r\n",
      "## 第 40 卦 解 雷水解 震上坎下\r\n",
      "\r\n",
      "解：利西南无所往其来复吉有攸往夙吉\r\n",
      "\r\n",
      "象曰：雷雨作解君子以赦过宥罪\r\n",
      "\r\n",
      "彖曰：解险以动动而免乎险解解利西南往得众也其来复吉乃得中也有攸往夙吉往有功也天地解而雷雨作雷雨作而百果草木皆甲坼解之时义大矣哉\r\n",
      "\r\n",
      "初六：无咎\r\n",
      "\r\n",
      "象曰：刚柔之际义无咎也\r\n",
      "\r\n",
      "九二：田获三狐得黄矢贞吉\r\n",
      "\r\n",
      "象曰：九二贞吉得中道也\r\n",
      "\r\n",
      "六三：负且乘致寇至贞吝\r\n",
      "\r\n",
      "象曰：负且乘亦可丑也自我致戎又谁咎也\r\n",
      "\r\n",
      "九四：解而拇朋至斯孚\r\n",
      "\r\n",
      "象曰：解而拇未当位也\r\n",
      "\r\n",
      "六五：君子维有解吉有孚于小人\r\n",
      "\r\n",
      "象曰：君子有解小人退也\r\n",
      "\r\n",
      "上六：公用射隼于高墉之上获之无不利\r\n",
      "\r\n",
      "象曰：公用射隼以解悖也\r\n",
      "\r\n",
      "## 第 41 卦 损 山泽损 艮上兑下\r\n",
      "\r\n",
      "损：有孚元吉无咎可贞利有攸往曷之用二簋可用享\r\n",
      "\r\n",
      "象曰：山下有泽损君子以惩忿窒欲\r\n",
      "\r\n",
      "彖曰：损损下益上其道上行损而有孚元吉无咎可贞利有攸往曷之用二簋可用享二簋应有时损刚益柔有时损益盈虚与时偕行\r\n",
      "\r\n",
      "初九：已事遄往无咎酌损之\r\n",
      "\r\n",
      "象曰：已事遄往尚合志也\r\n",
      "\r\n",
      "九二：利贞征凶弗损益之\r\n",
      "\r\n",
      "象曰：九二利贞中以为志也\r\n",
      "\r\n",
      "六三：三人行则损一人一人行则得其友\r\n",
      "\r\n",
      "象曰：一人行三则疑也\r\n",
      "\r\n",
      "六四：损其疾使遄有喜无咎\r\n",
      "\r\n",
      "象曰：损其疾亦可喜也\r\n",
      "\r\n",
      "六五：或益之十朋之龟弗克违元吉\r\n",
      "\r\n",
      "象曰：六五元吉自上佑也\r\n",
      "\r\n",
      "上九：弗损益之无咎贞吉利有攸往得臣无家\r\n",
      "\r\n",
      "象曰：弗损益之大得志也\r\n",
      "\r\n",
      "## 第 42 卦 益 风雷益 巽上震下\r\n",
      "\r\n",
      "益：利有攸往利涉大川\r\n",
      "\r\n",
      "象曰：风雷益君子以见善则迁有过则改\r\n",
      "\r\n",
      "彖曰：益损上益下民说无疆自上下下其道大光利有攸往中正有庆利涉大川木道乃行益动而巽日进无疆天施地生其益无方凡益之道与时偕行\r\n",
      "\r\n",
      "初九：利用为大作元吉无咎\r\n",
      "\r\n",
      "象曰：元吉无咎下不厚事也\r\n",
      "\r\n",
      "六二：或益之十朋之龟弗克违永贞吉王用享于帝吉\r\n",
      "\r\n",
      "象曰：或益之自外来也\r\n",
      "\r\n",
      "六三：益之用凶事无咎有孚中行告公用圭\r\n",
      "\r\n",
      "象曰：益用凶事固有之也\r\n",
      "\r\n",
      "六四：中行告公从利用为依迁国\r\n",
      "\r\n",
      "象曰：告公从以益志也\r\n",
      "\r\n",
      "九五：有孚惠心勿问元吉有孚惠我德\r\n",
      "\r\n",
      "象曰：有孚惠心勿问之矣惠我德大得志也\r\n",
      "\r\n",
      "上九：莫益之或击之立心勿恒凶\r\n",
      "\r\n",
      "象曰：莫益之偏辞也或击之自外来也\r\n",
      "\r\n",
      "## 第 43 卦 夬 泽天夬 兑上乾下\r\n",
      "\r\n",
      "夬：扬于王庭孚号有厉告自邑不利即戎利有攸往\r\n",
      "\r\n",
      "象曰：泽上于天夬君子以施禄及下居德则忌\r\n",
      "\r\n",
      "彖曰：夬决也刚决柔也健而说决而和扬于王庭柔乘五刚也孚号有厉其危乃光也告自邑不利即戎所尚乃穷也利有攸往刚长乃终也\r\n",
      "\r\n",
      "初九：壮于前趾往不胜为吝\r\n",
      "\r\n",
      "象曰：不胜而往咎也\r\n",
      "\r\n",
      "九二：惕号莫夜有戎勿恤\r\n",
      "\r\n",
      "象曰：有戎勿恤得中道也\r\n",
      "\r\n",
      "九三：壮于頄有凶君子夬夬独行遇雨若濡有愠无咎\r\n",
      "\r\n",
      "象曰：君子夬夬终无咎也\r\n",
      "\r\n",
      "九四：臀无肤其行次且牵羊悔亡闻言不信\r\n",
      "\r\n",
      "象曰：其行次且位不当也闻言不信聪不明也\r\n",
      "\r\n",
      "九五：苋陆夬夬中行无咎\r\n",
      "\r\n",
      "象曰：中行无咎中未光也\r\n",
      "\r\n",
      "上六：无号终有凶\r\n",
      "\r\n",
      "象曰：无号之凶终不可长也\r\n",
      "\r\n",
      "## 第 44 卦 姤 天风姤 乾上巽下\r\n",
      "\r\n",
      "姤：女壮勿用取女\r\n",
      "\r\n",
      "象曰：天下有风姤后以施命诰四方\r\n",
      "\r\n",
      "彖曰：姤遇也柔遇刚也勿用取女不可与长也天地相遇品物咸章也刚遇中正天下大行也姤之时义大矣哉\r\n",
      "\r\n",
      "初六：系于金柅贞吉有攸往见凶羸豕孚踟蹰\r\n",
      "\r\n",
      "象曰：系于金柅柔道牵也\r\n",
      "\r\n",
      "九二：包有鱼无咎不利宾\r\n",
      "\r\n",
      "象曰：包有鱼义不及宾也\r\n",
      "\r\n",
      "九三：臀无肤其行次且厉无大咎\r\n",
      "\r\n",
      "象曰：其行次且行未牵也\r\n",
      "\r\n",
      "九四：包无鱼起凶\r\n",
      "\r\n",
      "象曰：无鱼之凶远民也\r\n",
      "\r\n",
      "九五：以杞包瓜含章有陨自天\r\n",
      "\r\n",
      "象曰：九五含章中正也有陨自天志不舍命也\r\n",
      "\r\n",
      "上九：姤其角吝无咎\r\n",
      "\r\n",
      "象曰：姤其角上穷吝也\r\n",
      "\r\n",
      "## 第 45 卦 萃 泽地萃 兑上坤下\r\n",
      "\r\n",
      "萃：亨王假有庙利见大人亨利贞用大牲吉利有攸往\r\n",
      "\r\n",
      "象曰：泽上于地萃君子以除戎器戒不虞\r\n",
      "\r\n",
      "彖曰：萃聚也顺以说刚中而应故聚也王假有庙致孝享也利见大人亨聚以正也用大牲吉利有攸往顺天命也观其所聚而天地万物之情可见矣\r\n",
      "\r\n",
      "初六：有孚不终乃乱乃萃若号一握为笑勿恤往无咎\r\n",
      "\r\n",
      "象曰：乃乱乃萃其志乱也\r\n",
      "\r\n",
      "六二：引吉无咎孚乃利用禴\r\n",
      "\r\n",
      "象曰：引吉无咎中未变也\r\n",
      "\r\n",
      "六三：萃如嗟如无攸利往无咎小吝\r\n",
      "\r\n",
      "象曰：往无咎上巽也\r\n",
      "\r\n",
      "九四：大吉无咎\r\n",
      "\r\n",
      "象曰：大吉无咎位不当也\r\n",
      "\r\n",
      "九五：萃有位无咎匪孚元永贞悔亡\r\n",
      "\r\n",
      "象曰：萃有位志未光也\r\n",
      "\r\n",
      "上六：赍咨涕洟无咎\r\n",
      "\r\n",
      "象曰：赍咨涕洟未安上也\r\n",
      "\r\n",
      "## 第 46 卦 升 地风升 坤上巽下\r\n",
      "\r\n",
      "升：元亨用见大人勿恤南征吉\r\n",
      "\r\n",
      "象曰：地中生木升君子以顺德积小以高大\r\n",
      "\r\n",
      "彖曰：柔以时升巽而顺刚中而应是以大亨用见大人勿恤有庆也南征吉志行也\r\n",
      "\r\n",
      "初六：允升大吉\r\n",
      "\r\n",
      "象曰：允升大吉上合志也\r\n",
      "\r\n",
      "九二：孚乃利用禴无咎\r\n",
      "\r\n",
      "象曰：九二之孚有喜也\r\n",
      "\r\n",
      "九三：升虚邑\r\n",
      "\r\n",
      "象曰：升虚邑无所疑也\r\n",
      "\r\n",
      "六四：王用亨于岐山吉无咎\r\n",
      "\r\n",
      "象曰：王用亨于岐山顺事也\r\n",
      "\r\n",
      "六五：贞吉升阶\r\n",
      "\r\n",
      "象曰：贞吉升阶大得志也\r\n",
      "\r\n",
      "上六：冥升利于不息之贞\r\n",
      "\r\n",
      "象曰：冥升在上消不富也\r\n",
      "\r\n",
      "## 第 47 卦 困 泽水困 兑上坎下\r\n",
      "\r\n",
      "困：亨贞大人吉无咎有言不信\r\n",
      "\r\n",
      "象曰：泽无水困君子以致命遂志\r\n",
      "\r\n",
      "彖曰：困刚掩也险以说困而不失其所亨其唯君子乎贞大人吉以刚中也有言不信尚口乃穷也\r\n",
      "\r\n",
      "初六：臀困于株木入于幽谷三岁不见\r\n",
      "\r\n",
      "象曰：入于幽谷幽不明也\r\n",
      "\r\n",
      "九二：困于酒食朱绂方来利用亨祀征凶无咎\r\n",
      "\r\n",
      "象曰：困于酒食中有庆也\r\n",
      "\r\n",
      "六三：困于石据于蒺藜入于其宫不见其妻凶\r\n",
      "\r\n",
      "象曰：据于蒺藜乘刚也入于其宫不见其妻不祥也\r\n",
      "\r\n",
      "九四：来徐徐困于金车吝有终\r\n",
      "\r\n",
      "象曰：来徐徐志在下也虽不当位有与也\r\n",
      "\r\n",
      "九五：劓刖困于赤绂乃徐有说利用祭祀\r\n",
      "\r\n",
      "象曰：劓刖志未得也乃徐有说以中直也利用祭祀受福也\r\n",
      "\r\n",
      "上六：困于葛藟于臲卼曰动悔有悔征吉\r\n",
      "\r\n",
      "象曰：困于葛藟未当也动悔有悔吉行也\r\n",
      "\r\n",
      "## 第 48 卦 井 水风井 坎上巽下\r\n",
      "\r\n",
      "井：改邑不改井无丧无得往来井井汔至亦未繘井羸其瓶凶\r\n",
      "\r\n",
      "象曰：木上有水井君子以劳民劝相\r\n",
      "\r\n",
      "彖曰：巽乎水而上水井井养而不穷也改邑不改井乃以刚中也汔至亦未繘井未有功也羸其瓶是以凶也\r\n",
      "\r\n",
      "初六：井泥不食旧井无禽\r\n",
      "\r\n",
      "象曰：井泥不食下也旧井无禽时舍也\r\n",
      "\r\n",
      "九二：井谷射鲋瓮敝漏\r\n",
      "\r\n",
      "象曰：井谷射鲋无与也\r\n",
      "\r\n",
      "九三：井渫不食为我心恻可用汲王明并受其福\r\n",
      "\r\n",
      "象曰：井渫不食行恻也求王明受福也\r\n",
      "\r\n",
      "六四：井甃无咎\r\n",
      "\r\n",
      "象曰：井甃无咎修井也\r\n",
      "\r\n",
      "九五：井冽寒泉食\r\n",
      "\r\n",
      "象曰：寒泉之食中正也\r\n",
      "\r\n",
      "上六：井收勿幕有孚元吉\r\n",
      "\r\n",
      "象曰：元吉在上大成也\r\n",
      "\r\n",
      "## 第 49 卦 革 泽火革 兑上离下\r\n",
      "\r\n",
      "革：己日乃孚元亨利贞悔亡\r\n",
      "\r\n",
      "象曰：泽中有火革君子以治历明时\r\n",
      "\r\n",
      "彖曰：革水火相息二女同居其志不相得曰革己日乃孚革而信也文明以说大亨以正革而当其悔乃亡天地革而四时成汤武革命顺乎天而应乎人革之时义大矣哉\r\n",
      "\r\n",
      "初九：巩用黄牛之革\r\n",
      "\r\n",
      "象曰：巩用黄牛不可以有为也\r\n",
      "\r\n",
      "六二：己日乃革之征吉无咎\r\n",
      "\r\n",
      "象曰：己日革之行有嘉也\r\n",
      "\r\n",
      "九三：征凶贞厉革言三就有孚\r\n",
      "\r\n",
      "象曰：革言三就又何之矣\r\n",
      "\r\n",
      "九四：悔亡有孚改命吉\r\n",
      "\r\n",
      "象曰：改命之吉信志也\r\n",
      "\r\n",
      "九五：大人虎变未占有孚\r\n",
      "\r\n",
      "象曰：大人虎变其文炳也\r\n",
      "\r\n",
      "上六：君子豹变小人革面征凶居贞吉\r\n",
      "\r\n",
      "象曰：君子豹变其文蔚也小人革面顺以从君也\r\n",
      "\r\n",
      "## 第 50 卦 鼎 火风鼎 离上巽下\r\n",
      "\r\n",
      "鼎：元吉亨\r\n",
      "\r\n",
      "象曰：木上有火鼎君子以正位凝命\r\n",
      "\r\n",
      "彖曰：鼎象也以木巽火亨饪也圣人亨以享上帝而大亨以养圣贤巽而耳目聪明柔进而上行得中而应乎刚是以元亨\r\n",
      "\r\n",
      "初六：鼎颠趾利出否得妾以其子无咎\r\n",
      "\r\n",
      "象曰：鼎颠趾未悖也利出否以从贵也\r\n",
      "\r\n",
      "九二：鼎有实我仇有疾不我能即吉\r\n",
      "\r\n",
      "象曰：鼎有实慎所之也我仇有疾终无尤也\r\n",
      "\r\n",
      "九三：鼎耳革其行塞雉膏不食方雨亏悔终吉\r\n",
      "\r\n",
      "象曰：鼎耳革失其义也\r\n",
      "\r\n",
      "九四：鼎折足覆公餗其形渥凶\r\n",
      "\r\n",
      "象曰：覆公餗信如何也\r\n",
      "\r\n",
      "六五：鼎黄耳金铉利贞\r\n",
      "\r\n",
      "象曰：鼎黄耳中以为实也\r\n",
      "\r\n",
      "上九：鼎玉铉大吉无不利\r\n",
      "\r\n",
      "象曰：玉铉在上刚柔节也\r\n",
      "\r\n",
      "## 第 51 卦 震 震为雷 震上震下\r\n",
      "\r\n",
      "震：亨震来虩虩笑言哑哑震惊百里不丧匕鬯\r\n",
      "\r\n",
      "象曰：洊雷震君子以恐惧修省\r\n",
      "\r\n",
      "彖曰：震亨震来虩虩恐致福也笑言哑哑后有则也震惊百里惊远而惧迩也不丧匕鬯出可以守宗庙社稷以为祭主也\r\n",
      "\r\n",
      "初九：震来虩虩后笑言哑哑吉\r\n",
      "\r\n",
      "象曰：震来虩虩恐致福也笑言哑哑后有则也\r\n",
      "\r\n",
      "六二：震来厉亿丧贝跻于九陵勿逐七日得\r\n",
      "\r\n",
      "象曰：震来厉乘刚也\r\n",
      "\r\n",
      "六三：震苏苏震行无眚\r\n",
      "\r\n",
      "象曰：震苏苏位不当也\r\n",
      "\r\n",
      "九四：震遂泥\r\n",
      "\r\n",
      "象曰：震遂泥未光也\r\n",
      "\r\n",
      "六五：震往来厉亿无丧有事\r\n",
      "\r\n",
      "象曰：震往来厉危行也其事在中大无丧也\r\n",
      "\r\n",
      "上六：震索索视矍矍征凶震不于其躬于其邻无咎婚媾有言\r\n",
      "\r\n",
      "象曰：震索索未得中也虽凶无咎畏邻戒也\r\n",
      "\r\n",
      "## 第 52 卦 艮 艮为山 艮上艮下\r\n",
      "\r\n",
      "艮：艮其背不获其身行其庭不见其人无咎\r\n",
      "\r\n",
      "象曰：兼山艮君子以思不出其位\r\n",
      "\r\n",
      "彖曰：艮止也时止则止时行则行动静不失其时其道光明艮其止止其所也上下敌应不相与也是以不获其身行其庭不见其人无咎也\r\n",
      "\r\n",
      "初六：艮其趾无咎利永贞\r\n",
      "\r\n",
      "象曰：艮其趾未失正也\r\n",
      "\r\n",
      "六二：艮其腓不拯其随其心不快\r\n",
      "\r\n",
      "象曰：不拯其随未退听也\r\n",
      "\r\n",
      "九三：艮其限列其夤厉薰心\r\n",
      "\r\n",
      "象曰：艮其限危薰心也\r\n",
      "\r\n",
      "六四：艮其身无咎\r\n",
      "\r\n",
      "象曰：艮其身止诸躬也\r\n",
      "\r\n",
      "六五：艮其辅言有序悔亡\r\n",
      "\r\n",
      "象曰：艮其辅以中正也\r\n",
      "\r\n",
      "上九：敦艮吉\r\n",
      "\r\n",
      "象曰：敦艮之吉以厚终也\r\n",
      "\r\n",
      "## 第 53 卦 渐 风山渐 巽上艮下\r\n",
      "\r\n",
      "渐：女归吉利贞\r\n",
      "\r\n",
      "象曰：山上有木渐君子以居贤德善俗\r\n",
      "\r\n",
      "彖曰：渐之进也女归吉也进得位往有功也进以正可以正邦也其位刚得中也止而巽动不穷也\r\n",
      "\r\n",
      "初六：鸿渐于干小子厉有言无咎\r\n",
      "\r\n",
      "象曰：小子之厉义无咎也\r\n",
      "\r\n",
      "六二：鸿渐于磐饮食衎衎吉\r\n",
      "\r\n",
      "象曰：饮食衎衎不素饱也\r\n",
      "\r\n",
      "九三：鸿渐于陆夫征不复妇孕不育凶利御寇\r\n",
      "\r\n",
      "象曰：夫征不复离群丑也妇孕不育失其道也利用御寇顺相保也\r\n",
      "\r\n",
      "六四：鸿渐于木或得其桷无咎\r\n",
      "\r\n",
      "象曰：或得其桷顺以巽也\r\n",
      "\r\n",
      "九五：鸿渐于陵妇三岁不孕终莫之胜吉\r\n",
      "\r\n",
      "象曰：终莫之胜吉得所愿也\r\n",
      "\r\n",
      "上九：鸿渐于陆其羽可用为仪吉\r\n",
      "\r\n",
      "象曰：其羽可用为仪吉不可乱也\r\n",
      "\r\n",
      "## 第 54 卦 归妹 雷泽归妹 震上兑下\r\n",
      "\r\n",
      "归妹：征凶无攸利\r\n",
      "\r\n",
      "象曰：泽上有雷归妹君子以永终知敝\r\n",
      "\r\n",
      "彖曰：归妹天地之大义也天地不交而万物不兴归妹人之终始也说以动所归妹也征凶位不当也无攸利柔乘刚也\r\n",
      "\r\n",
      "初九：归妹以娣跛能履征吉\r\n",
      "\r\n",
      "象曰：归妹以娣以恒也跛能履吉相承也\r\n",
      "\r\n",
      "九二：眇能视利幽人之贞\r\n",
      "\r\n",
      "象曰：利幽人之贞未变常也\r\n",
      "\r\n",
      "六三：归妹以须反归以娣\r\n",
      "\r\n",
      "象曰：归妹以须未当也\r\n",
      "\r\n",
      "九四：归妹愆期迟归有时\r\n",
      "\r\n",
      "象曰：愆期之志有待而行也\r\n",
      "\r\n",
      "六五：帝乙归妹其君之袂不如其娣之袂良月几望吉\r\n",
      "\r\n",
      "象曰：帝乙归妹不如其娣之袂良也其位在中以贵行也\r\n",
      "\r\n",
      "上六：女承筐无实士刲羊无血无攸利\r\n",
      "\r\n",
      "象曰：上六无实承虚筐也\r\n",
      "\r\n",
      "## 第 55 卦 丰 雷火丰 震上离下\r\n",
      "\r\n",
      "丰：亨王假之勿忧宜日中\r\n",
      "\r\n",
      "象曰：雷电皆至丰君子以折狱致刑\r\n",
      "\r\n",
      "彖曰：丰大也明以动故丰王假之尚大也勿忧宜日中宜照天下也日中则昃月盈则食天地盈虚与时消息而况于人乎况于鬼神乎\r\n",
      "\r\n",
      "初九：遇其配主虽旬无咎往有尚\r\n",
      "\r\n",
      "象曰：虽旬无咎过旬灾也\r\n",
      "\r\n",
      "六二：丰其蔀日中见斗往得疑疾有孚发若吉\r\n",
      "\r\n",
      "象曰：有孚发若信以发志也\r\n",
      "\r\n",
      "九三：丰其沛日中见昧折其右肱无咎\r\n",
      "\r\n",
      "象曰：丰其沛不可大事也折其右肱终不可用也\r\n",
      "\r\n",
      "九四：丰其蔀日中见斗遇其夷主吉\r\n",
      "\r\n",
      "象曰：丰其蔀位不当也日中见斗幽不明也遇其夷主吉行也\r\n",
      "\r\n",
      "六五：来章有庆誉吉\r\n",
      "\r\n",
      "象曰：六五之吉有庆也\r\n",
      "\r\n",
      "上六：丰其屋蔀其家窥其户阒其无人三岁不见凶\r\n",
      "\r\n",
      "象曰：丰其屋天际翔也窥其户阒其无人自藏也\r\n",
      "\r\n",
      "## 第 56 卦 旅 火山旅 离上艮下\r\n",
      "\r\n",
      "旅：小亨旅贞吉\r\n",
      "\r\n",
      "象曰：山上有火旅君子以明慎用刑而不留狱\r\n",
      "\r\n",
      "彖曰：旅小亨柔得中乎外而顺乎刚止而丽乎明是以小亨旅贞吉也旅之时义大矣哉\r\n",
      "\r\n",
      "初六：旅琐琐斯其所取灾\r\n",
      "\r\n",
      "象曰：旅琐琐志穷灾也\r\n",
      "\r\n",
      "六二：旅即次怀其资得童仆贞\r\n",
      "\r\n",
      "象曰：得童仆贞终无尤也\r\n",
      "\r\n",
      "九三：旅焚其次丧其童仆贞厉\r\n",
      "\r\n",
      "象曰：旅焚其次亦以伤矣以旅与下其义丧也\r\n",
      "\r\n",
      "九四：旅于处得其资斧我心不快\r\n",
      "\r\n",
      "象曰：旅于处未得位也得其资斧心未快也\r\n",
      "\r\n",
      "六五：射雉一矢亡终以誉命\r\n",
      "\r\n",
      "象曰：终以誉命上逮也\r\n",
      "\r\n",
      "上九：鸟焚其巢旅人先笑后号啕丧牛于易凶\r\n",
      "\r\n",
      "象曰：以旅在上其义焚也丧牛于易终莫之闻也\r\n",
      "\r\n",
      "## 第 57 卦 巽 巽为风 巽上巽下\r\n",
      "\r\n",
      "巽：小亨利有攸往利见大人\r\n",
      "\r\n",
      "象曰：随风巽君子以申命行事\r\n",
      "\r\n",
      "彖曰：重巽以申命刚巽乎中正而志行柔皆顺乎刚是以小亨利有攸往利见大人\r\n",
      "\r\n",
      "初六：进退利武人之贞\r\n",
      "\r\n",
      "象曰：进退志疑也利武人之贞志治也\r\n",
      "\r\n",
      "九二：巽在床下用史巫纷若吉无咎\r\n",
      "\r\n",
      "象曰：纷若之吉得中也\r\n",
      "\r\n",
      "九三：频巽吝\r\n",
      "\r\n",
      "象曰：频巽之吝志穷也\r\n",
      "\r\n",
      "六四：悔亡田获三品\r\n",
      "\r\n",
      "象曰：田获三品有功也\r\n",
      "\r\n",
      "九五：贞吉悔亡无不利无初有终先庚三日后庚三日吉\r\n",
      "\r\n",
      "象曰：九五之吉位正中也\r\n",
      "\r\n",
      "上九：巽在床下丧其资斧贞凶\r\n",
      "\r\n",
      "象曰：巽在床下上穷也丧其资斧正乎凶也\r\n",
      "\r\n",
      "## 第 58 卦 兑 兑为泽 兑上兑下\r\n",
      "\r\n",
      "兑：亨利贞\r\n",
      "\r\n",
      "象曰：丽泽兑君子以朋友讲习\r\n",
      "\r\n",
      "彖曰：兑说也刚中而柔外说以利贞是以顺乎天而应乎人说以先民民忘其劳说以犯难民忘其死说之大民劝矣哉\r\n",
      "\r\n",
      "初九：和兑吉\r\n",
      "\r\n",
      "象曰：和兑之吉行未疑也\r\n",
      "\r\n",
      "九二：孚兑吉悔亡\r\n",
      "\r\n",
      "象曰：孚兑之吉信志也\r\n",
      "\r\n",
      "六三：来兑凶\r\n",
      "\r\n",
      "象曰：来兑之凶位不当也\r\n",
      "\r\n",
      "九四：商兑未宁介疾有喜\r\n",
      "\r\n",
      "象曰：九四之喜有庆也\r\n",
      "\r\n",
      "九五：孚于剥有厉\r\n",
      "\r\n",
      "象曰：孚于剥位正当也\r\n",
      "\r\n",
      "上六：引兑\r\n",
      "\r\n",
      "象曰：上六引兑未光也\r\n",
      "\r\n",
      "## 第 59 卦 涣 风水涣 巽上坎下\r\n",
      "\r\n",
      "涣：亨王假有庙利涉大川利贞\r\n",
      "\r\n",
      "象曰：风行水上涣先王以享于帝立庙\r\n",
      "\r\n",
      "彖曰：涣亨刚来而不穷柔得位乎外而上同王假有庙王乃在中也利涉大川乘木有功也\r\n",
      "\r\n",
      "初六：用拯马壮吉\r\n",
      "\r\n",
      "象曰：初六之吉顺也\r\n",
      "\r\n",
      "九二：涣奔其机悔亡\r\n",
      "\r\n",
      "象曰：涣奔其机得愿也\r\n",
      "\r\n",
      "六三：涣其躬无悔\r\n",
      "\r\n",
      "象曰：涣其躬志在外也\r\n",
      "\r\n",
      "六四：涣其群元吉涣有丘匪夷所思\r\n",
      "\r\n",
      "象曰：涣其群元吉光大也\r\n",
      "\r\n",
      "九五：涣汗其大号涣王居无咎\r\n",
      "\r\n",
      "象曰：王居无咎正位也\r\n",
      "\r\n",
      "上九：涣其血去逖出无咎\r\n",
      "\r\n",
      "象曰：涣其血远害也\r\n",
      "\r\n",
      "## 第 60 卦 节 水泽节 坎上兑下\r\n",
      "\r\n",
      "节：亨苦节不可贞\r\n",
      "\r\n",
      "象曰：泽上有水节君子以制数度议德行\r\n",
      "\r\n",
      "彖曰：节亨刚柔分而刚得中苦节不可贞其道穷也说以行险当位以节中正以通天地节而四时成节以制度不伤财不害民\r\n",
      "\r\n",
      "初九：不出户庭无咎\r\n",
      "\r\n",
      "象曰：不出户庭知通塞也\r\n",
      "\r\n",
      "九二：不出门庭凶\r\n",
      "\r\n",
      "象曰：不出门庭失时极也\r\n",
      "\r\n",
      "六三：不节若则嗟若无咎\r\n",
      "\r\n",
      "象曰：不节之嗟又谁咎也\r\n",
      "\r\n",
      "六四：安节亨\r\n",
      "\r\n",
      "象曰：安节之亨承上道也\r\n",
      "\r\n",
      "九五：甘节吉往有尚\r\n",
      "\r\n",
      "象曰：甘节之吉居位中也\r\n",
      "\r\n",
      "上六：苦节贞凶悔亡\r\n",
      "\r\n",
      "象曰：苦节贞凶其道穷也\r\n",
      "\r\n",
      "## 第 61 卦 中孚 风泽中孚 巽上兑下\r\n",
      "\r\n",
      "中孚：豚鱼吉利涉大川利贞\r\n",
      "\r\n",
      "象曰：泽上有风中孚君子以议狱缓死\r\n",
      "\r\n",
      "彖曰：中孚柔在内而刚得中说而巽孚乃化邦也豚鱼吉信及豚鱼也利涉大川乘木舟虚也中孚以利贞乃应乎天也\r\n",
      "\r\n",
      "初九：虞吉有他不燕\r\n",
      "\r\n",
      "象曰：初九虞吉志未变也\r\n",
      "\r\n",
      "九二：鸣鹤在阴其子和之我有好爵吾与尔靡之\r\n",
      "\r\n",
      "象曰：其子和之中心愿也\r\n",
      "\r\n",
      "六三：得敌或鼓或罢或泣或歌\r\n",
      "\r\n",
      "象曰：或鼓或罢位不当也\r\n",
      "\r\n",
      "六四：月几望马匹亡无咎\r\n",
      "\r\n",
      "象曰：马匹亡绝类上也\r\n",
      "\r\n",
      "九五：有孚挛如无咎\r\n",
      "\r\n",
      "象曰：有孚挛如位正当也\r\n",
      "\r\n",
      "上九：翰音登于天贞凶\r\n",
      "\r\n",
      "象曰：翰音登于天何可长也\r\n",
      "\r\n",
      "## 第 62 卦 小过 雷山小过 震上艮下\r\n",
      "\r\n",
      "小过：亨利贞可小事不可大事飞鸟遗之音不宜上宜下大吉\r\n",
      "\r\n",
      "象曰：山上有雷小过君子以行过乎恭丧过乎哀用过乎俭\r\n",
      "\r\n",
      "彖曰：小过小者过而亨也过以利贞与时行也柔得中是以小事吉也刚失位而不中是以不可大事也有飞鸟之象焉飞鸟遗之音不宜上宜下大吉上逆而下顺也\r\n",
      "\r\n",
      "初六：飞鸟以凶\r\n",
      "\r\n",
      "象曰：飞鸟以凶不可如何也\r\n",
      "\r\n",
      "六二：过其祖遇其妣不及其君遇其臣无咎\r\n",
      "\r\n",
      "象曰：不及其君臣不可过也\r\n",
      "\r\n",
      "九三：弗过防之从或戕之凶\r\n",
      "\r\n",
      "象曰：从或戕之凶如何也\r\n",
      "\r\n",
      "九四：无咎弗过遇之往厉必戒勿用永贞\r\n",
      "\r\n",
      "象曰：弗过遇之位不当也往厉必戒终不可长也\r\n",
      "\r\n",
      "六五：密云不雨自我西郊公弋取彼在穴\r\n",
      "\r\n",
      "象曰：密云不雨已上也\r\n",
      "\r\n",
      "上六：弗遇过之飞鸟离之凶是谓灾眚\r\n",
      "\r\n",
      "象曰：弗遇过之已亢也\r\n",
      "\r\n",
      "## 第 63 卦 既济 水火既济 坎上离下\r\n",
      "\r\n",
      "既济：亨小利贞初吉终乱\r\n",
      "\r\n",
      "象曰：水在火上既济君子以思患而豫防之\r\n",
      "\r\n",
      "彖曰：既济亨小者亨也利贞刚柔正而位当也初吉柔得中也终止则乱其道穷也\r\n",
      "\r\n",
      "初九：曳其轮濡其尾无咎\r\n",
      "\r\n",
      "象曰：曳其轮义无咎也\r\n",
      "\r\n",
      "六二：妇丧其茀勿逐七日得\r\n",
      "\r\n",
      "象曰：七日得以中道也\r\n",
      "\r\n",
      "九三：高宗伐鬼方三年克之小人勿用\r\n",
      "\r\n",
      "象曰：三年克之惫也\r\n",
      "\r\n",
      "六四：繻有衣袽终日戒\r\n",
      "\r\n",
      "象曰：终日戒有所疑也\r\n",
      "\r\n",
      "九五：东邻杀牛不如西邻之禴祭实受其福\r\n",
      "\r\n",
      "象曰：东邻杀牛不如西邻之时也实受其福吉大来也\r\n",
      "\r\n",
      "上六：濡其首厉\r\n",
      "\r\n",
      "象曰：濡其首厉何可久也\r\n",
      "\r\n",
      "## 第 64 卦 未济 火水未济 离上坎下\r\n",
      "\r\n",
      "未济：亨小狐汔济濡其尾无攸利\r\n",
      "\r\n",
      "象曰：火在水上未济君子以慎辨物居方\r\n",
      "\r\n",
      "彖曰：未济亨柔得中也小狐汔济未出中也濡其尾无攸利不续终也虽不当位刚柔应也\r\n",
      "\r\n",
      "初六：濡其尾吝\r\n",
      "\r\n",
      "象曰：濡其尾亦不知极也\r\n",
      "\r\n",
      "九二：曳其轮贞吉\r\n",
      "\r\n",
      "象曰：九二贞吉中以行正也\r\n",
      "\r\n",
      "六三：未济征凶利涉大川\r\n",
      "\r\n",
      "象曰：未济征凶位不当也\r\n",
      "\r\n",
      "九四：贞吉悔亡震用伐鬼方三年有赏于大国\r\n",
      "\r\n",
      "象曰：贞吉悔亡志行也\r\n",
      "\r\n",
      "六五：贞吉无悔君子之光有孚吉\r\n",
      "\r\n",
      "象曰：君子之光其晖吉也\r\n",
      "\r\n",
      "上九：有孚于饮酒无咎濡其首有孚失是\r\n",
      "\r\n",
      "象曰：饮酒濡首亦不知节也\r\n",
      "\r\n",
      "# 易传其他\r\n",
      "\r\n",
      "## 系辞 上\r\n",
      "\r\n",
      "天尊地卑乾坤定矣卑高以陈贵贱位矣动静有常刚柔断矣方以类聚物以群分吉凶生矣在天成象在地成形变化见矣是故刚柔相摩八卦相荡鼓 之以雷霆润之以风雨日月运行一寒一暑乾道成男坤道成女乾知大始坤作成物乾以易知坤以简能易则易知简则易从易知则有亲易从则有功有亲则可久有功则可大可久则贤人之德可大则贤人之业易简而天下之理得矣天下之理得而成位乎其中矣\r\n",
      "\r\n",
      "圣人设卦观象系辞焉而明吉凶刚柔相推而生变化是故吉凶者失得之象也悔吝者忧虞之象也变化者进退之象也刚柔者昼夜之象也六爻之动三极之道也是故君子所居而安者易之序也所乐而玩者爻之辞也是故君子居则观其象而玩其辞动则观其变而玩其占是故自天佑之吉无不利\r\n",
      "\r\n",
      "彖者言乎象者也爻者言乎变者也吉凶者言乎其失得也悔吝者言乎其小疵也无咎者善补过也是故列贵贱者存乎位齐小大者存乎卦辩吉凶者存乎辞忧悔吝者存乎介震无咎者存乎悔是故卦有小大辞有险易辞也者也各指其所之\r\n",
      "\r\n",
      "易与天地准故能弥纶天地之道仰以观于天文俯以察于地理是故知幽明之故原始反终故知死生之说精气为物游魂为变是故知鬼神之情状与天地相似故不违知周乎万物而道济天下故不过旁行而不流乐天知命故不忧安土敦乎仁故能爱范围天地之化而不过曲成万物而不遗通乎昼夜之道而知故神无方而易无体\r\n",
      "\r\n",
      "一阴一阳之谓道继之者善也成之者性也仁者见之谓之仁知者见之谓之知百姓日用不知故君子之道鲜矣显诸仁藏诸用鼓万物而不与圣人同忧盛德大业至矣哉富有之谓大业日新之谓盛德生生之谓易成象之谓乾效法之谓坤极数知来之谓占通变之谓事阴阳不测之谓神\r\n",
      "\r\n",
      "夫易广矣大矣以言乎远则不御以言乎迩则静而正以言乎天地之间则备矣夫乾其静也专其动也直是以大生焉夫坤其静也翕其动也辟是以广生焉广大配天地变通配四时阴阳之义配日月易简之善配至德\r\n",
      "\r\n",
      "子曰易其至矣乎夫易圣人所以崇德而广业也知崇礼卑崇效天卑法地天地设位而易行乎其中矣成性存存道义之门\r\n",
      "\r\n",
      "圣人有以见天下之赜而拟诸其形容象其物宜是故谓之象圣人有以见天下之动而观其会通以行其礼系辞焉以断其吉凶是故谓之爻言天下之至赜而不可恶也言天下之至动而不可乱也拟之而后言议之而后动拟议以成其变化鸣鹤在阴其子和之我有好爵吾与尔靡之子曰君子居其室出其言善则千里之外应之况其迩者乎居其室出其言不善则千里之外违之况其迩者乎言出乎身加乎民行发乎迩见乎远言行君子之枢机枢机之发荣辱之主也言行君子之所以动天地也可不慎乎同人先号啕而后笑子曰君子之道或出或处或默或语二人同心其利断金同心之言其臭如兰初六藉用白茅无咎子曰苟错诸地而可矣藉之用茅何咎之有慎之至也夫茅之为物薄而用可重也慎斯术也以往其无所失矣劳谦君子有终吉子曰劳而不伐有功而不德厚之至也语以其功下人者也德言盛礼言恭谦也者致恭以存其位者也亢龙有悔子曰贵而无位高而无民贤人在下位而无辅是以动而有悔也不出户庭无咎子曰乱之所生也则言语以为阶君不密则失臣臣不密则失身几事不密则害成是以君子慎密而不出也子曰作易者其知盗乎易曰负且乘致寇至负也者小人之事也小人而乘君子之器盗思夺矣上慢下暴盗思伐之矣慢藏诲盗冶容诲淫易曰负且乘致寇至盗之招也\r\n",
      "\r\n",
      "天一地二天三地四天五地六天七地八天九地十天数五地数五五位相得而各有合天数二十有五地数三十凡天地之数五十有五此所以成变化而行鬼神也大衍之数五十其用四十有九分而为二以象两挂一以象三揲之以四以象四时归奇于扐以象闰故再扐而后挂乾之策二百一十有六坤之策百四十有四凡三百有六十当期之日二篇之策万有一千五百二十当万物之数也是故四营而成易十有八变而成卦八卦而小成引而伸之触类而长之天下之能事毕矣显道神德行是故可与酬酢可与佑神矣子曰知变化之道者其知神之所为乎\r\n",
      "\r\n",
      "易有圣人之道四焉以言者尚其辞以动者尚其变以制器者尚其象以卜筮者尚其占是以君子将有为也将有行也问焉而以言其受命也如响无有远近幽深遂知来物非天下之至精其孰能与于此参伍以变错综其数通其变遂成天地之文极其数遂定天下之象非天下之致变其孰能与于此易无思也无为也寂然不动感而遂通天下之故非天下之致神其孰能与于此夫易圣人之所以极深而研几也惟深也故能通天下之志惟几也故能成天下之务惟神也故不疾而速不行而至子曰易有圣人之道四焉者此之谓也\r\n",
      "\r\n",
      "子曰夫易何为者也夫易开物成务冒天下之道如斯而已者也是故圣人以通天下之志以定天下之业以断天下之疑是故蓍之德圆而神卦之德方以知六爻之义易以贡圣人以此洗心退藏于密吉凶与民同患神以知来知以藏往其孰能与于此哉古之聪明睿知神武而不杀者夫是以明于天之道而察于民之故是与神物以前民用圣人以此斋戒以神明其德夫是故阖户谓之坤辟户谓之乾一阖一辟谓之变往来不穷谓之通见乃谓之象形乃谓之器制而用之谓之法利用出入民咸用之谓之神是故易有太极是生两仪两仪生四象四象生八卦八卦定吉凶吉凶生大业是故法象莫大乎天地变通莫大乎四时悬象著明莫在乎日月崇高莫大乎富贵备物致用立成器以为天下利莫大乎圣人探赜索隐钩深致远以定天下之吉凶成天下之亹亹者莫大乎蓍龟是故天生神物圣人则之天地变化圣人效之天垂象见吉凶圣人象之河出图洛出书圣人则之易有四象所以示也系辞焉所以告也定之以吉凶所以断也\r\n",
      "\r\n",
      "易曰自天佑之吉无不利子曰佑者助也天之所助者顺也人之所助者信也履信思乎顺又以尚贤也是以自天佑之吉无不利也子曰书不尽言言不尽意然则圣人之意其不可见乎子曰圣人立象以尽意设卦以尽情伪系辞焉以尽其言变而通之以尽利鼓之舞之以尽神乾坤其易之缊邪乾坤成列而易立乎其中矣乾坤毁则无以见易易不可见则乾坤或几乎息矣是故形而上者谓之道形而下者谓之器化而裁之谓之变推而行之谓之通举而错之天下之民谓之事业是故夫象圣人有以见天下之赜而拟诸形容象其物宜是故谓之象圣人有以见天下之动而观其会通以行其典礼系辞焉以断其吉凶是故谓之爻极天下之赜者存乎卦鼓天下之动者存乎辞化而裁之存乎变推而行之存乎通神而明之存乎其人默而成之不言而信存乎德行\r\n",
      "\r\n",
      "## 系辞 下\r\n",
      "\r\n",
      "八卦成列象在其中矣因而重之爻在其中矣刚柔相推变在其中矣系辞焉而命之动在其中矣吉凶悔吝者生乎动者也刚柔者立本者也变通者趣 时者也吉凶者贞胜者也天地之道贞观者也日月之道贞明者也天下之动贞夫一者也夫乾确然示人易矣夫坤聩然示人简矣爻也者效此者也象也者像此者也爻象动乎内吉凶见乎外功业见乎变圣人之情见乎辞天地之大德曰生圣人之大宝曰位何以守位曰仁何以聚人曰财理财正辞禁民为非曰义\r\n",
      "\r\n",
      "古者包羲氏之王天下也仰则观象于天俯则观法于地观鸟兽之文与地之宜近取诸身远取诸物于是始作八卦以通神明之德以类万物之情作结绳而为网罟以佃以渔盖取诸离包羲氏没神农氏作斫木为耜揉木为耒耒耨之利以教天下盖取诸益日中为市致天下之货交易而退各得其所盖取诸噬嗑神农氏没黄帝尧舜氏作通其变使民不倦神而化之使民宜之易穷则变变则通通则久是以自天佑之吉无不利黄帝尧舜垂衣裳而天下治盖取诸乾坤刳木为舟剡木为楫舟楫之利以济不通致远以利天下盖取诸涣服牛乘马引重致远以利天下盖取诸随重门击柝以待暴客盖取诸豫断木为杵掘地为臼臼杵之利万民以济盖取诸小过弦木为弧剡木为矢弧矢之利以威天下盖取诸睽上古穴居而野处后世圣人易之以宫室上栋下宇以待风雨盖取诸大壮古之葬者厚衣之以薪葬之中野不封不树丧期无数后世圣人易之以棺椁盖取诸大过上古结绳而治后世圣人易之以书契百官以治万民以察盖取诸夬\r\n",
      "\r\n",
      "是故易者象也象也者像也彖者材也爻也者效天下之动也是故吉凶生而悔吝著也\r\n",
      "\r\n",
      "阳卦多阴阴卦多阳其故何也阳卦奇阴卦耦其德行何也阳一君而二民君子之道也阴二君而一民小人之道也\r\n",
      "\r\n",
      "易曰憧憧往来朋从尔思子曰天下何思何虑天下同归而殊途一致而百虑天下何思何虑日往则月来月往则日来日月相推而明生焉寒往则暑来暑往则寒来寒暑相推而岁成焉往者屈也来者信也屈信相感而利生焉尺蠖之屈以求信也龙蛇之蛰以存身也精义入神以致用也利用安身以崇德也过此以往未之或知也穷神知化德之盛也易曰困于石据于蒺藜入于其宫不见其妻凶子曰非所困而困焉名必辱非所据而据焉身必危既辱且危死期将至妻其可得见邪易曰公用射隼于高墉之上获之无不利子曰隼者禽也弓矢者器也射之者人也君子藏器于身待时而动何不利之有动而不括是以出而不获语成器而动者也子曰小人不耻不仁不畏不义不见利而不劝不威不惩小惩而大诫此小人之福也易曰履校灭趾无咎此之谓也善不积不足以成名恶不积不足以灭身小人以小善为无益而弗为也以小恶为无伤而弗去也故恶积而不可掩罪大而不可解易曰履校灭耳凶子曰危者安其位者也亡者保其存者也乱者有其治者也是故君子安而不忘危存而不忘亡治而不忘乱是以身安而国家可保也易曰其亡其亡系于苞桑子曰德薄而位尊知小而谋大力少而任重鲜不及矣易曰鼎折足覆公餗其形渥凶言不胜其任也子曰知几其神乎君子上交不谄下交不渎其知几乎几者动之微吉之先见者也君子见几而作不俟终日易曰介于石不终日贞吉介如石焉宁用终日断可识矣君子知微知彰知柔知刚万夫之望子曰颜氏之子其殆庶几乎有不善未尝不知知之未尝复行也易曰不远复无祗悔元吉天地氤氲万物化醇男女构精万物化生易曰三人行则损一人一人行则得其友言致一也子曰君子安其身而后动易其心而后语定其交而后求君子修此三者故全也危以动则民不与也惧以语则民不应也无交而求则民不与也莫之与则伤之者至矣易曰莫益之或击之立心勿恒凶\r\n",
      "\r\n",
      "子曰乾坤其易之门邪乾阳物也坤阴物也阴阳合德而刚柔有体以体天地之撰以通神明之德其称名也杂而不越于稽其类其衰世之意邪夫易彰往而察来而微显阐幽开而当名辨物正言断辞则备矣其称名也小其取类也大其旨远其辞文其言曲而中其事肆而隐因贰以济民行以明失得之报\r\n",
      "\r\n",
      "易之兴也其于中古乎作易者其有忧患乎是故履德之基也谦德之柄也复德之本也恒德之固也损德之修也益德之裕也困德之辨也井德之地也巽德之制也履和而至谦尊而光复小而辨于物恒杂而不厌损先难而后易益长裕而不设困穷而通井居其所而迁巽称而隐履以和行谦以制礼复以自知恒以一德损以远害益以兴利困以寡怨井以辨义巽以行权\r\n",
      "\r\n",
      "易之为书也不可远为道也屡迁变动不居周流六虚上下无常刚柔相易不可为典要唯变所适其出入以度外内使知惧又明于忧患与故无有师保如临父母初率其辞而揆其方既有典常苟非其人道不虚行\r\n",
      "\r\n",
      "易之为书也原始要终以为质也六爻相杂唯其时物也其初难知其上易知本末也初辞拟之卒成之终若夫杂物撰德辨是与非则非其中爻不备噫亦要存亡吉凶则居可知矣知者观其彖辞则思过半矣二与四同功而异位其善不同二多誉四多惧近也柔之为道不利远者其要无咎其用柔中也三与五同功而异位三多凶五多功贵贱之等也其柔危其刚胜邪\r\n",
      "\r\n",
      "易之为书也广大悉备有天道焉有人道焉有地道焉兼三才而两之故六六者非它也三才之道也道有变动故曰爻爻有等故曰物物相杂故曰文文不当故吉凶生焉\r\n",
      "\r\n",
      "易之兴也其当殷之末世周之盛德邪当文王与纣之事邪是故其辞危危者使平易者使倾其道甚大百物不废惧以终始其要无咎此之谓易之道也\r\n",
      "\r\n",
      "夫乾天下之至健也德行恒易以知险夫坤天下之至顺也德行恒简以知阻能说诸心能研诸侯之虑定天下之吉凶成天下之亹亹者是故变化云为吉事有祥象事知器占事知来天地设位圣人成能人谋鬼谋百姓与能八卦以象告爻彖以情言刚柔杂居而吉凶可见矣变动以利言吉凶以情迁是故爱恶相攻而吉凶生远近相取而悔吝生情伪相感而利害生凡易之情近而不相得则凶或害之悔且吝将叛者其辞惭中心疑者其辞枝吉人之辞寡躁人之辞多诬善之人其辞游失其守者其辞屈\r\n",
      "\r\n",
      "## 说卦\r\n",
      "\r\n",
      "昔者圣人之作易也幽赞于神明而生蓍参天两地而倚数观变于阴阳而立卦发挥于刚柔而生爻和顺于道德而理于义穷理尽性以至于命\r\n",
      "\r\n",
      "昔 者圣人之作易也将以顺性命之理是以立天之道曰阴与阳立地之道曰柔与刚立人之道曰仁与义兼三才而两之故易六画而成卦分阴分阳迭用柔刚故易六位而成章\r\n",
      "\r\n",
      "天地定位山泽通气雷风相薄水火不相射八卦相错数往者顺知来者逆是故易逆数也\r\n",
      "\r\n",
      "雷以动之风以散之雨以润之日以烜之艮以止之兑以说之乾以君之坤以藏之\r\n",
      "\r\n",
      "帝出乎震齐乎巽相见乎离致役乎坤说言乎兑战乎乾劳乎坎成言乎艮万物出乎震震东方也齐乎巽巽东南也齐也者言万物之洁齐也离也者明也万物皆相见南方之卦也圣人南面而听天下向明而治盖取诸此也坤也者地也万物皆致养焉故曰致役乎坤兑正秋也万物之所说也故曰说言乎兑战乎乾乾西北之卦也言阴阳相薄也坎者水也正北方之卦也劳卦也万物之所归也故曰劳乎坎艮东北之卦也万物之所成终而成始也故曰成言乎艮\r\n",
      "\r\n",
      "神也者妙万物而为言者也动万物者莫疾乎雷桡万物者莫疾乎风燥万物者莫熯乎火说万物者莫说乎泽润万物者莫润乎水终万物始万物者莫盛乎艮故水火相逮雷风不相悖山泽通气然后能变化既成万物也\r\n",
      "\r\n",
      "乾健也坤顺也震动也巽入也坎陷也离丽也艮止也兑说也\r\n",
      "\r\n",
      "乾为马坤为牛震为龙巽为鸡坎为豕离为雉艮为狗兑为羊\r\n",
      "\r\n",
      "乾为首坤为腹震为足巽为股坎为耳离为目艮为手兑为口\r\n",
      "\r\n",
      "乾天也故称乎父坤地也故称乎母震一索而得男故谓之长男巽一索而得女故谓之长女坎再索而得男故谓之中男离再索而得女故谓之中女艮三索而得男故谓之少男兑三索而得女故谓之少女\r\n",
      "\r\n",
      "乾为天为圆为君为父为玉为金为寒为冰为大赤为良马为老马为瘠马为驳马为木果坤为地为母为布为釜为吝啬为均为子母牛为大舆为文为众为柄其于地也为黑震为雷为龙为玄黄为旉为大涂为长子为决躁为苍筤竹为萑苇其于马也为善鸣为馵足为作足为的颡其于稼也为反生其究为健为蕃鲜巽为木为风为长女为绳直为工为白为长为高为进退为不果为臭其于人也为寡发为广颡为多白眼为近利市三倍其究为躁卦坎为水为沟渎为隐伏为矫輮为弓轮其于人也为加忧为心病为耳痛为血卦为赤其于马也为美脊为亟心为下首为薄蹄为曳其于舆也为多眚为通为月为盗其于木也为坚多心离为火为日为电为中女为甲胄为戈兵其于人也为大腹为乾卦为鳖为蟹为蠃为蚌为龟其于木也为科上槁艮为山为径路为小石为门阙为果蓏为阍寺为指为狗为鼠为黔喙之属其于木也为坚多节兑为泽为少女为巫为口舌为毁折为附决其于地也为刚卤为妾为羊\r\n",
      "\r\n",
      "## 序卦\r\n",
      "\r\n",
      "有天地然后万物生焉盈天地之间者唯万物故受之以屯屯者盈也屯者物之始生也物生必蒙故受之以蒙蒙者蒙也物之稚也物稚不可不养也故 受之以需需者饮食之道也饮食必有讼故受之以讼讼必有众起故受之以师师者众也众必有所比故受之以比比者比也比必有所畜故受之以小畜物畜然后有礼故受之以履履者礼也履而泰然后安故受之以泰泰者通也物不可以终通故受之以否物不可以终否故受之以同人与人同者物必归焉故受之以大有有大者不可以盈故受之以谦有大而能谦必豫故受之以豫豫必有随故受之以随以喜随人者必有事故受之以蛊蛊者事也有事而后可大故受之以临临者大也物大然后可观故受之以观可观而后有所合故受之以噬嗑嗑者合也物不可以苟合而已故受之以贲贲者饰也致饰然后亨则尽矣故受之以剥剥者剥也物不可以终尽剥穷上反下故受之以复复则不妄矣故受之以无妄有无妄然后可畜故受之以大畜物畜然后可养故受之以颐颐者养也不养则不可动故受之以大过物不可以终过故受之以坎坎者陷也陷必有所丽故受之以离离者丽也\r\n",
      "\r\n",
      "有天地然后有万物有万物然后有男女有男女然后有夫妇有夫妇然后有父子有父子然后有君臣有君臣然后有上下有上下然后礼义有所错夫妇之道不可以不久也故受之以恒恒者久也物不可以久居其所故受之以遁遁者退也物不可以终遁故受之以大壮物不可以终壮故受之以晋晋者进也进必有所伤故受之以明夷夷者伤也伤于外者必反其家故受之以家人家道穷必乖故受之以睽睽者乖也乖必有难故受之以蹇蹇者难也物不可以终难故受之以解解者缓也缓必有所失故受之以损损而不已必益故受之以益益而不已必决故受之以夬夬者决也决必有遇故受之以姤姤者遇也物相遇而后聚故受之以萃萃者聚也聚而上者谓之升故受之以升升而不已必困故受之以困困乎上者必反下故受之以井井道不可不革故受之以革革物者莫若鼎故受之以鼎主器者莫若长子故受之以震震者动也物不可以终动止之故受之以艮艮者止也物不可以终止故受之以渐渐者进也进必有所归故受之以归妹得其所归者必大故受之以丰丰者大也穷大者必失其居故受之以旅旅而无所容故受之以巽巽者入也入而后说之故受之以兑兑者说也说而后散之故受之以涣涣者离也物不可以终离故受之以节节而信之故受之以中孚有其信者必行之故受之以小过有过物者必济故受之以既济物不可穷也故受之以未济终焉\r\n",
      "\r\n",
      "## 杂卦\r\n",
      "\r\n",
      "乾刚坤柔比乐师忧临观之义或与或求屯见而不失其居蒙杂而著震起也艮止也损益盛衰之始也大畜时也无妄灾也萃聚而升不来也谦轻而豫怠也噬嗑食也贲无色也兑见而巽伏也随无故也蛊则饬也剥烂也复反也晋昼也明夷诛也井通而困相遇也咸速也恒久也涣离也节止也解缓也蹇难也睽外也家人内也否泰反其类也大壮则止遁则退也大有众也同人亲也革去故也鼎取新也小过过也中孚信也丰多故也亲寡旅也离上而坎下也小畜寡也履不处也需不进也讼不亲也大过颠也姤遇也柔遇刚也渐女归待男行也颐养正也既济定也归妹女之终也未济男之穷也夬决也刚决柔也君子道长小人道忧也\r\n",
      "\r\n",
      "\r\n"
     ]
    }
   ],
   "source": [
    "var uri = \"https://yueyinqiu.github.io/my-yijing-annotation-stores/975345ca/2023-08-02-1.json\";\n",
    "var httpClient = new HttpClient();\n",
    "var storeString = await httpClient.GetStringAsync(storeUri);\n",
    "var zhouyi = ZhouyiStore.DeserializeFromJsonString(storeString);\n",
    "Debug.Assert(zhouyi is not null);\n",
    "\n",
    "var output = new StringBuilder();\n",
    "\n",
    "void WriteGua(int index)\n",
    "{\n",
    "    Debug.Assert(zhouyi is not null);\n",
    "    var gua = zhouyi.GetHexagramByIndex(index.ToString(\"00\"));\n",
    "    Debug.Assert(gua is not null);\n",
    "    var (upperPainting, lowerPainting) = gua.SplitToTrigrams();\n",
    "    var upper = zhouyi.GetTrigram(upperPainting);\n",
    "    var lower = zhouyi.GetTrigram(lowerPainting);\n",
    "\n",
    "    var titlePart1 = $\"第 {gua.Index} 卦\";\n",
    "    var titlePart2 = gua.Name;\n",
    "    var titlePart3 = upperPainting == lowerPainting ?\n",
    "        $\"{gua.Name}为{upper.Nature}\" :\n",
    "        $\"{upper.Nature}{lower.Nature}{gua.Name}\";\n",
    "    string titlePart4 = $\"{upper.Name}上{lower.Name}下\";\n",
    "\n",
    "    output.AppendLine($\"## {titlePart1} {titlePart2} {titlePart3} {titlePart4}\");\n",
    "    output.AppendLine();\n",
    "\n",
    "    output.AppendLine($\"{gua.Name}：{gua.Text}\");\n",
    "    output.AppendLine();\n",
    "\n",
    "    output.AppendLine($\"象曰：{gua.Xiang}\");\n",
    "    output.AppendLine();\n",
    "\n",
    "    output.AppendLine($\"彖曰：{gua.Tuan}\");\n",
    "    output.AppendLine();\n",
    "\n",
    "    foreach (var yao in gua.EnumerateYaos(true))\n",
    "    {\n",
    "        if (yao.YaoText is null)\n",
    "            continue;\n",
    "\n",
    "        var yinyang = yao.YinYang ?? gua.FirstYao.YinYang;\n",
    "        Debug.Assert(yinyang.HasValue);\n",
    "        var yinyangString = yinyang.Value.IsYang ? \"九\" : \"六\";\n",
    "        output.AppendLine(yao.YaoIndex switch\n",
    "        {\n",
    "            1 => $\"初{yinyangString}：{yao.YaoText}\",\n",
    "            2 => $\"{yinyangString}二：{yao.YaoText}\",\n",
    "            3 => $\"{yinyangString}三：{yao.YaoText}\",\n",
    "            4 => $\"{yinyangString}四：{yao.YaoText}\",\n",
    "            5 => $\"{yinyangString}五：{yao.YaoText}\",\n",
    "            6 => $\"上{yinyangString}：{yao.YaoText}\",\n",
    "            _ => $\"用{yinyangString}：{yao.YaoText}\",\n",
    "        });\n",
    "        output.AppendLine();\n",
    "\n",
    "        output.AppendLine($\"象曰：{yao.Xiang}\");\n",
    "        output.AppendLine();\n",
    "    }\n",
    "\n",
    "    if (gua.Wenyan is not null)\n",
    "    {\n",
    "        output.AppendLine($\"文言：{gua.Wenyan}\");\n",
    "        output.AppendLine();\n",
    "    }\n",
    "}\n",
    "\n",
    "output.AppendLine(\"# 经、象、彖 上\");\n",
    "output.AppendLine();\n",
    "\n",
    "for (int i = 1; i <= 30; i++)\n",
    "{\n",
    "    WriteGua(i);\n",
    "}\n",
    "\n",
    "output.AppendLine(\"# 经、象、彖 下\");\n",
    "output.AppendLine();\n",
    "\n",
    "for (int i = 31; i <= 64; i++)\n",
    "{\n",
    "    WriteGua(i);\n",
    "}\n",
    "\n",
    "output.AppendLine(\"# 易传其他\");\n",
    "output.AppendLine();\n",
    "\n",
    "output.AppendLine(\"## 系辞 上\");\n",
    "output.AppendLine();\n",
    "\n",
    "var markdownNewLine = $\"{Environment.NewLine}{Environment.NewLine}\";\n",
    "output.AppendLine(zhouyi.GetXici().PartA?.ReplaceLineEndings(markdownNewLine));\n",
    "output.AppendLine();\n",
    "\n",
    "output.AppendLine(\"## 系辞 下\");\n",
    "output.AppendLine();\n",
    "\n",
    "output.AppendLine(zhouyi.GetXici().PartB?.ReplaceLineEndings(markdownNewLine));\n",
    "output.AppendLine();\n",
    "\n",
    "output.AppendLine(\"## 说卦\");\n",
    "output.AppendLine();\n",
    "\n",
    "output.AppendLine(zhouyi.GetShuogua().Content?.ReplaceLineEndings(markdownNewLine));\n",
    "output.AppendLine();\n",
    "\n",
    "output.AppendLine(\"## 序卦\");\n",
    "output.AppendLine();\n",
    "\n",
    "output.AppendLine(zhouyi.GetXugua().Content?.ReplaceLineEndings(markdownNewLine));\n",
    "output.AppendLine();\n",
    "\n",
    "output.AppendLine(\"## 杂卦\");\n",
    "output.AppendLine();\n",
    "\n",
    "output.AppendLine(zhouyi.GetZagua().Content?.ReplaceLineEndings(markdownNewLine));\n",
    "output.AppendLine();\n",
    "\n",
    "Console.WriteLine(output);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "> 这个示例中，要求所用的仓库是以 `\"00\"` 格式的数字作为 `ZhouyiHexagram.Index` 的。这不是对所有仓库通用的。如果您是在自己制作注解仓库，也不需要把这个作为要求，使用中文也完全没问题。这也是为什么我们选择 `string` 作为 `Index` 的类型。\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".NET (C#)",
   "language": "C#",
   "name": ".net-csharp"
  },
  "language_info": {
   "file_extension": ".cs",
   "mimetype": "text/x-csharp",
   "name": "C#",
   "pygments_lexer": "csharp",
   "version": "11.0"
  },
  "polyglot_notebook": {
   "kernelInfo": {
    "defaultKernelName": "csharp",
    "items": [
     {
      "aliases": [],
      "name": "csharp"
     }
    ]
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
